From ada9da5aa9528a3bc6ab9d701ca998087ae92d08 Mon Sep 17 00:00:00 2001 From: Brent Baker Date: Thu, 13 Jun 2013 10:07:45 -0400 Subject: [PATCH] Bug 1128: use Date.prototype.getFullYear() in S15.2.2.1_A2_T5 Bug 1131: use String.prototype.charAt() in 15.12.3-11-26 Both of these changes were accidentaly dropped when I regenerated patches for these bugs. I have grepped the testsuite to ensure that the annexB functions only appear in the annexB section of the testsuite. NOTE: Also regenerated the website based on this change. (Still waiting for permission to actually update the live website) --- test/suite/ch15/15.12/15.12.3/15.12.3-11-26.js | 2 +- test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T5.js | 2 +- website/json/ch15.json | 4 ++-- website/json/suiteDescrip.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) 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 8581058c86..36c5c306b3 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 @@ -16,6 +16,6 @@ function testcase() { arrObj[2] = "c"; var jsonText = JSON.stringify(arrObj, undefined, "").toString(); - return jsonText.substr(jsonText.length - 1, 1) === "]"; + return jsonText.charAt(jsonText.length - 1) === "]"; } runTestCase(testcase); 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 a5d3ec350d..08e181ca71 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 @@ -19,7 +19,7 @@ if (n_obj !== obj) { } //CHECK#2 -if ((n_obj.getYear() !== 78)||(n_obj.getMonth() !== 3)) { +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/website/json/ch15.json b/website/json/ch15.json index f1d26f383e..7c612e7628 100644 --- a/website/json/ch15.json +++ b/website/json/ch15.json @@ -5850,7 +5850,7 @@ "path":"TestCases/ch15/15.12/15.12.3/15.12.3-11-25.js" }, { -"code":"Ly8vIENvcHlyaWdodCAoYykgMjAxMiBFY21hIEludGVybmF0aW9uYWwuICBBbGwgcmlnaHRzIHJlc2VydmVkLiANCi8qKg0KICogQHBhdGggY2gxNS8xNS4xMi8xNS4xMi4zLzE1LjEyLjMtMTEtMjYuanMNCiAqIEBkZXNjcmlwdGlvbiBKU09OLnN0cmluZ2lmeSAtIHRoZSBsYXN0IGVsZW1lbnQgb2YgdGhlIGNvbmNhdGVuYXRpb24gaXMgJ10nIChUaGUgYWJzdHJhY3Qgb3BlcmF0aW9uIEpBKHZhbHVlKSBzdGVwIDEwLmIuaWlpKQ0KICovDQoNCg0KZnVuY3Rpb24gdGVzdGNhc2UoKSB7DQogICAgICAgIHZhciBhcnJPYmogPSBbXTsNCiAgICAgICAgYXJyT2JqWzBdID0gImEiOw0KICAgICAgICBhcnJPYmpbMV0gPSAiYiI7DQogICAgICAgIGFyck9ialsyXSA9ICJjIjsNCg0KICAgICAgICB2YXIganNvblRleHQgPSBKU09OLnN0cmluZ2lmeShhcnJPYmosIHVuZGVmaW5lZCwgIiIpLnRvU3RyaW5nKCk7DQogICAgICAgIHJldHVybiBqc29uVGV4dC5zdWJzdHIoanNvblRleHQubGVuZ3RoIC0gMSwgMSkgPT09ICJdIjsNCiAgICB9DQpydW5UZXN0Q2FzZSh0ZXN0Y2FzZSk7DQo=", +"code":"Ly8vIENvcHlyaWdodCAoYykgMjAxMiBFY21hIEludGVybmF0aW9uYWwuICBBbGwgcmlnaHRzIHJlc2VydmVkLiANCi8qKg0KICogQHBhdGggY2gxNS8xNS4xMi8xNS4xMi4zLzE1LjEyLjMtMTEtMjYuanMNCiAqIEBkZXNjcmlwdGlvbiBKU09OLnN0cmluZ2lmeSAtIHRoZSBsYXN0IGVsZW1lbnQgb2YgdGhlIGNvbmNhdGVuYXRpb24gaXMgJ10nIChUaGUgYWJzdHJhY3Qgb3BlcmF0aW9uIEpBKHZhbHVlKSBzdGVwIDEwLmIuaWlpKQ0KICovDQoNCg0KZnVuY3Rpb24gdGVzdGNhc2UoKSB7DQogICAgICAgIHZhciBhcnJPYmogPSBbXTsNCiAgICAgICAgYXJyT2JqWzBdID0gImEiOw0KICAgICAgICBhcnJPYmpbMV0gPSAiYiI7DQogICAgICAgIGFyck9ialsyXSA9ICJjIjsNCg0KICAgICAgICB2YXIganNvblRleHQgPSBKU09OLnN0cmluZ2lmeShhcnJPYmosIHVuZGVmaW5lZCwgIiIpLnRvU3RyaW5nKCk7DQogICAgICAgIHJldHVybiBqc29uVGV4dC5jaGFyQXQoanNvblRleHQubGVuZ3RoIC0gMSkgPT09ICJdIjsNCiAgICB9DQpydW5UZXN0Q2FzZSh0ZXN0Y2FzZSk7DQo=", "commentary":"", "description":"JSON.stringify - the last element of the concatenation is ']' (The abstract operation JA(value) step 10.b.iii)", "path":"TestCases/ch15/15.12/15.12.3/15.12.3-11-26.js" @@ -6234,7 +6234,7 @@ "path":"TestCases/ch15/15.2/15.2.2/S15.2.2.1_A2_T4.js" }, { -"code":"Ly8gQ29weXJpZ2h0IDIwMDkgdGhlIFNwdXRuaWsgYXV0aG9ycy4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuCi8qKgogKiBXaGVuIHRoZSBPYmplY3QgY29uc3RydWN0b3IgaXMgY2FsbGVkIHdpdGggb25lIGFyZ3VtZW50IHZhbHVlIGFuZAogKiB0aGUgdmFsdWUgaXMgYSBuYXRpdmUgRUNNQVNjcmlwdCBvYmplY3QsIGRvIG5vdCBjcmVhdGUgYSBuZXcgb2JqZWN0IGJ1dCBzaW1wbHkgcmV0dXJuIHZhbHVlCiAqCiAqIEBwYXRoIGNoMTUvMTUuMi8xNS4yLjIvUzE1LjIuMi4xX0EyX1Q1LmpzCiAqIEBkZXNjcmlwdGlvbiBUaGUgdmF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VDSyMxCmlmIChuX29iaiAhPT0gb2JqKSB7CiAgJEVSUk9SKCcjMTogV2hlbiB0aGUgT2JqZWN0IGNvbnN0cnVjdG9yIGlzIGNhbGxlZCBhbmQgaWYgdGhlIHZhbHVlIGlzIGFuIE9iamVjdCBzaW1wbHkgdmFsdWUgcmV0dXJucy4nKTsKfQoKLy9DSEVDSyMyCmlmICgobl9vYmouZ2V0RnVsbFllYXIoKSAhPT0gMTk3OCl8fChuX29iai5nZXRNb250aCgpICE9PSAzKSkgewogICRFUlJPUignIzI6IFdoZW4gdGhlIE9iamVjdCBjb25zdHJ1Y3RvciBpcyBjYWxsZWQgYW5kIGlmIHRoZSB2YWx1ZSBpcyBhbiBPYmplY3Qgc2ltcGx5IHZhbHVlIHJldHVybnMuJyk7Cn0KCg==", "commentary":"When the Object constructor is called with one argument value and\nthe value is a native ECMAScript object, do not create a new object but simply return value", "description":"The value is a Date object", "path":"TestCases/ch15/15.2/15.2.2/S15.2.2.1_A2_T5.js" diff --git a/website/json/suiteDescrip.json b/website/json/suiteDescrip.json index 16fbd94be8..589992a2f6 100644 --- a/website/json/suiteDescrip.json +++ b/website/json/suiteDescrip.json @@ -1 +1 @@ -{"date":"2013-06-07","version":"ES5.1"} \ No newline at end of file +{"date":"2013-06-13","version":"ES5.1"} \ No newline at end of file