{ "testsCollection":{ "name":"Chapter - annexB", "numTests":"12", "tests":[ { "code":"Ly8vIENvcHlyaWdodCAoYykgMjAxMiBFY21hIEludGVybmF0aW9uYWwuICBBbGwgcmlnaHRzIHJlc2VydmVkLiANCi8qKg0KICogQHBhdGggYW5uZXhCL0IuMi4xLmpzDQogKiBAZGVzY3JpcHRpb24gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvciByZXR1cm5zIGRhdGEgZGVzYyBmb3IgZnVuY3Rpb25zIG9uIGJ1aWx0LWlucyAoR2xvYmFsLmVzY2FwZSkNCiAqLw0KDQoNCmZ1bmN0aW9uIHRlc3RjYXNlKCkgew0KICB2YXIgZ2xvYmFsID0gZm5HbG9iYWxPYmplY3QoKTsNCiAgdmFyIGRlc2MgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKGdsb2JhbCwgImVzY2FwZSIpOw0KICBpZiAoZGVzYy52YWx1ZSA9PT0gZ2xvYmFsLmVzY2FwZSAmJg0KICAgICAgZGVzYy53cml0YWJsZSA9PT0gdHJ1ZSAmJg0KICAgICAgZGVzYy5lbnVtZXJhYmxlID09PSBmYWxzZSAmJg0KICAgICAgZGVzYy5jb25maWd1cmFibGUgPT09IHRydWUpIHsNCiAgICByZXR1cm4gdHJ1ZTsNCiAgfQ0KIH0NCnJ1blRlc3RDYXNlKHRlc3RjYXNlKTsNCg==", "commentary":"", "description":"Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.escape)", "path":"TestCases/annexB/B.2.1.js" }, { "code":"Ly8gQ29weXJpZ2h0IDIwMDkgdGhlIFNwdXRuaWsgYXV0aG9ycy4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuCi8qKgogKiBDaGVjayB0eXBlIG9mIHZhcmlvdXMgcHJvcGVydGllcwogKgogKiBAcGF0aCBhbm5leEIvQi4yLjEucHJvcGVydHlDaGVjay5qcwogKiBAZGVzY3JpcHRpb24gQ2hlY2tpbmcgcHJvcGVydGllcyBvZiB0aGlzIG9iamVjdCAoZXNjYXBlKQogKi8KCmlmICh0eXBlb2YgdGhpcy5lc2NhcGUgID09PSAidW5kZWZpbmVkIikgICRFUlJPUignIzE6IHR5cGVvZiB0aGlzLmVzY2FwZSAhPT0gInVuZGVmaW5lZCInKTsKaWYgKHR5cGVvZiB0aGlzWydlc2NhcGUnXSA9PT0gInVuZGVmaW5lZCIpICAkRVJST1IoJyMyOiB0eXBlb2YgdGhpc1siZXNjYXBlIl0gIT09ICJ1bmRlZmluZWQiJyk7Cg==", "commentary":"Check type of various properties", "description":"Checking properties of this object (escape)", "path":"TestCases/annexB/B.2.1.propertyCheck.js" }, { "code":"Ly8vIENvcHlyaWdodCAoYykgMjAxMiBFY21hIEludGVybmF0aW9uYWwuICBBbGwgcmlnaHRzIHJlc2VydmVkLiANCi8qKg0KICogQHBhdGggYW5uZXhCL0IuMi4yLmpzDQogKiBAZGVzY3JpcHRpb24gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvciByZXR1cm5zIGRhdGEgZGVzYyBmb3IgZnVuY3Rpb25zIG9uIGJ1aWx0LWlucyAoR2xvYmFsLnVuZXNjYXBlKQ0KICovDQoNCg0KZnVuY3Rpb24gdGVzdGNhc2UoKSB7DQogIHZhciBnbG9iYWwgPSBmbkdsb2JhbE9iamVjdCgpOw0KICB2YXIgZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoZ2xvYmFsLCAgInVuZXNjYXBlIik7DQogIGlmIChkZXNjLnZhbHVlID09PSBnbG9iYWwudW5lc2NhcGUgJiYNCiAgICAgIGRlc2Mud3JpdGFibGUgPT09IHRydWUgJiYNCiAgICAgIGRlc2MuZW51bWVyYWJsZSA9PT0gZmFsc2UgJiYNCiAgICAgIGRlc2MuY29uZmlndXJhYmxlID09PSB0cnVlKSB7DQogICAgcmV0dXJuIHRydWU7DQogIH0NCiB9DQpydW5UZXN0Q2FzZSh0ZXN0Y2FzZSk7DQo=", "commentary":"", "description":"Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.unescape)", "path":"TestCases/annexB/B.2.2.js" }, { "code":"Ly8gQ29weXJpZ2h0IDIwMDkgdGhlIFNwdXRuaWsgYXV0aG9ycy4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuCi8qKgogKiBDaGVjayB0eXBlIG9mIHZhcmlvdXMgcHJvcGVydGllcwogKgogKiBAcGF0aCBhbm5leEIvQi4yLjIucHJvcGVydHlDaGVjay5qcwogKiBAZGVzY3JpcHRpb24gQ2hlY2tpbmcgcHJvcGVydGllcyBvZiB0aGlzIG9iamVjdCAodW5lc2NhcGUpCiAqLwoKaWYgKHR5cGVvZiB0aGlzLnVuZXNjYXBlICA9PT0gInVuZGVmaW5lZCIpICAkRVJST1IoJyMxOiB0eXBlb2YgdGhpcy51bmVzY2FwZSAhPT0gInVuZGVmaW5lZCInKTsKaWYgKHR5cGVvZiB0aGlzWyd1bmVzY2FwZSddID09PSAidW5kZWZpbmVkIikgICRFUlJPUignIzI6IHR5cGVvZiB0aGlzWyJ1bmVzY2FwZSJdICE9PSAidW5kZWZpbmVkIicpOwo=", "commentary":"Check type of various properties", "description":"Checking properties of this object (unescape)", "path":"TestCases/annexB/B.2.2.propertyCheck.js" }, { "code":"Ly8vIENvcHlyaWdodCAoYykgMjAxMiBFY21hIEludGVybmF0aW9uYWwuICBBbGwgcmlnaHRzIHJlc2VydmVkLiANCi8qKg0KICogQHBhdGggYW5uZXhCL0IuMi4zLmpzDQogKiBAZGVzY3JpcHRpb24gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvciByZXR1cm5zIGRhdGEgZGVzYyBmb3IgZnVuY3Rpb25zIG9uIGJ1aWx0LWlucyAoU3RyaW5nLnByb3RvdHlwZS5zdWJzdHIpDQogKi8NCg0KDQpmdW5jdGlvbiB0ZXN0Y2FzZSgpIHsNCiAgdmFyIGRlc2MgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKFN0cmluZy5wcm90b3R5cGUsICJzdWJzdHIiKTsNCiAgaWYgKGRlc2MudmFsdWUgPT09IFN0cmluZy5wcm90b3R5cGUuc3Vic3RyICYmDQogICAgICBkZXNjLndyaXRhYmxlID09PSB0cnVlICYmDQogICAgICBkZXNjLmVudW1lcmFibGUgPT09IGZhbHNlICYmDQogICAgICBkZXNjLmNvbmZpZ3VyYWJsZSA9PT0gdHJ1ZSkgew0KICAgIHJldHVybiB0cnVlOw0KICB9DQogfQ0KcnVuVGVzdENhc2UodGVzdGNhc2UpOw0K", "commentary":"", "description":"Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.substr)", "path":"TestCases/annexB/B.2.3.js" }, { "code":"Ly8vIENvcHlyaWdodCAoYykgMjAxMiBFY21hIEludGVybmF0aW9uYWwuICBBbGwgcmlnaHRzIHJlc2VydmVkLiANCi8qKg0KICogQHBhdGggYW5uZXhCL0IuMi40LmpzDQogKiBAZGVzY3JpcHRpb24gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvciByZXR1cm5zIGRhdGEgZGVzYyBmb3IgZnVuY3Rpb25zIG9uIGJ1aWx0LWlucyAoRGF0ZS5wcm90b3R5cGUuZ2V0WWVhcikNCiAqLw0KDQoNCmZ1bmN0aW9uIHRlc3RjYXNlKCkgew0KICB2YXIgZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoRGF0ZS5wcm90b3R5cGUsICJnZXRZZWFyIik7DQogIGlmIChkZXNjLnZhbHVlID09PSBEYXRlLnByb3RvdHlwZS5nZXRZZWFyICYmDQogICAgICBkZXNjLndyaXRhYmxlID09PSB0cnVlICYmDQogICAgICBkZXNjLmVudW1lcmFibGUgPT09IGZhbHNlICYmDQogICAgICBkZXNjLmNvbmZpZ3VyYWJsZSA9PT0gdHJ1ZSkgew0KICAgIHJldHVybiB0cnVlOw0KICB9DQogfQ0KcnVuVGVzdENhc2UodGVzdGNhc2UpOw0K", "commentary":"", "description":"Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getYear)", "path":"TestCases/annexB/B.2.4.js" }, { "code":"Ly8gQ29weXJpZ2h0IDIwMDkgdGhlIFNwdXRuaWsgYXV0aG9ycy4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuCi8qKgogKiBDaGVjayB0eXBlIG9mIHZhcmlvdXMgcHJvcGVydGllcwogKgogKiBAcGF0aCBhbm5leEIvQi4yLjQucHJvcGVydHlDaGVjay5qcwogKiBAZGVzY3JpcHRpb24gQ2hlY2tpbmcgcHJvcGVydGllcyBvZiB0aGUgRGF0ZSBvYmplY3QgKGdldFllYXIpCiAqLwoKaWYgKHR5cGVvZiBEYXRlLnByb3RvdHlwZS5nZXRZZWFyICE9PSAiZnVuY3Rpb24iKSAgJEVSUk9SKCcjMTogdHlwZW9mIERhdGUucHJvdG90eXBlLmdldFllYXIgPT09ICJmdW5jdGlvbiIuIEFjdHVhbDogJyArICh0eXBlb2YgRGF0ZS5wcm90b3R5cGUuZ2V0WWVhciApKTsKaWYgKHR5cGVvZiBEYXRlLnByb3RvdHlwZVsnZ2V0WWVhciddICE9PSAiZnVuY3Rpb24iKSAgJEVSUk9SKCcjMjogdHlwZW9mIERhdGUucHJvdG90eXBlWyJnZXRZZWFyIl0gPT09ICJmdW5jdGlvbiIuIEFjdHVhbDogJyArICh0eXBlb2YgRGF0ZS5wcm90b3R5cGVbImdldFllYXIiXSApKTsKCgoK", "commentary":"Check type of various properties", "description":"Checking properties of the Date object (getYear)", "path":"TestCases/annexB/B.2.4.propertyCheck.js" }, { "code":"Ly8vIENvcHlyaWdodCAoYykgMjAxMiBFY21hIEludGVybmF0aW9uYWwuICBBbGwgcmlnaHRzIHJlc2VydmVkLiANCi8qKg0KICogQHBhdGggYW5uZXhCL0IuMi41LmpzDQogKiBAZGVzY3JpcHRpb24gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvciByZXR1cm5zIGRhdGEgZGVzYyBmb3IgZnVuY3Rpb25zIG9uIGJ1aWx0LWlucyAoRGF0ZS5wcm90b3R5cGUuc2V0WWVhcikNCiAqLw0KDQoNCmZ1bmN0aW9uIHRlc3RjYXNlKCkgew0KICB2YXIgZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoRGF0ZS5wcm90b3R5cGUsICJzZXRZZWFyIik7DQogIGlmIChkZXNjLnZhbHVlID09PSBEYXRlLnByb3RvdHlwZS5zZXRZZWFyICYmDQogICAgICBkZXNjLndyaXRhYmxlID09PSB0cnVlICYmDQogICAgICBkZXNjLmVudW1lcmFibGUgPT09IGZhbHNlICYmDQogICAgICBkZXNjLmNvbmZpZ3VyYWJsZSA9PT0gdHJ1ZSkgew0KICAgIHJldHVybiB0cnVlOw0KICB9DQogfQ0KcnVuVGVzdENhc2UodGVzdGNhc2UpOw0K", "commentary":"", "description":"Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setYear)", "path":"TestCases/annexB/B.2.5.js" }, { "code":"Ly8gQ29weXJpZ2h0IDIwMDkgdGhlIFNwdXRuaWsgYXV0aG9ycy4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuCi8qKgogKiBDaGVjayB0eXBlIG9mIHZhcmlvdXMgcHJvcGVydGllcwogKgogKiBAcGF0aCBhbm5leEIvQi4yLjUucHJvcGVydHlDaGVjay5qcwogKiBAZGVzY3JpcHRpb24gQ2hlY2tpbmcgcHJvcGVydGllcyBvZiB0aGUgRGF0ZSBvYmplY3QgKHNldFllYXIpCiAqLwoKaWYgKHR5cGVvZiBEYXRlLnByb3RvdHlwZS5zZXRZZWFyICE9PSAiZnVuY3Rpb24iKSAgJEVSUk9SKCcjMTogdHlwZW9mIERhdGUucHJvdG90eXBlLnNldFllYXIgPT09ICJmdW5jdGlvbiIuIEFjdHVhbDogJyArICh0eXBlb2YgRGF0ZS5wcm90b3R5cGUuc2V0WWVhciApKTsKaWYgKHR5cGVvZiBEYXRlLnByb3RvdHlwZVsnc2V0WWVhciddICE9PSAiZnVuY3Rpb24iKSAgJEVSUk9SKCcjMjogdHlwZW9mIERhdGUucHJvdG90eXBlWyJzZXRZZWFyIl0gPT09ICJmdW5jdGlvbiIuIEFjdHVhbDogJyArICh0eXBlb2YgRGF0ZS5wcm90b3R5cGVbInNldFllYXIiXSApKTsKCgoK", "commentary":"Check type of various properties", "description":"Checking properties of the Date object (setYear)", "path":"TestCases/annexB/B.2.5.propertyCheck.js" }, { "code":"Ly8vIENvcHlyaWdodCAoYykgMjAxMiBFY21hIEludGVybmF0aW9uYWwuICBBbGwgcmlnaHRzIHJlc2VydmVkLiANCi8qKg0KICogQHBhdGggYW5uZXhCL0IuMi42LmpzDQogKiBAZGVzY3JpcHRpb24gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvciByZXR1cm5zIGRhdGEgZGVzYyBmb3IgZnVuY3Rpb25zIG9uIGJ1aWx0LWlucyAoRGF0ZS5wcm90b3R5cGUudG9HTVRTdHJpbmcpDQogKi8NCg0KDQpmdW5jdGlvbiB0ZXN0Y2FzZSgpIHsNCiAgdmFyIGRlc2MgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKERhdGUucHJvdG90eXBlLCAidG9HTVRTdHJpbmciKTsNCiAgaWYgKGRlc2MudmFsdWUgPT09IERhdGUucHJvdG90eXBlLnRvR01UU3RyaW5nICYmDQogICAgICBkZXNjLndyaXRhYmxlID09PSB0cnVlICYmDQogICAgICBkZXNjLmVudW1lcmFibGUgPT09IGZhbHNlICYmDQogICAgICBkZXNjLmNvbmZpZ3VyYWJsZSA9PT0gdHJ1ZSkgew0KICAgIHJldHVybiB0cnVlOw0KICB9DQogfQ0KcnVuVGVzdENhc2UodGVzdGNhc2UpOw0K", "commentary":"", "description":"Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toGMTString)", "path":"TestCases/annexB/B.2.6.js" }, { "code":"Ly8gQ29weXJpZ2h0IDIwMDkgdGhlIFNwdXRuaWsgYXV0aG9ycy4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuCi8qKgogKiBDaGVjayB0eXBlIG9mIHZhcmlvdXMgcHJvcGVydGllcwogKgogKiBAcGF0aCBhbm5leEIvQi4yLjYucHJvcGVydHlDaGVjay5qcwogKiBAZGVzY3JpcHRpb24gQ2hlY2tpbmcgcHJvcGVydGllcyBvZiB0aGUgRGF0ZSBvYmplY3QgKHRvR01UU3RyaW5nKQogKi8KCmlmICh0eXBlb2YgRGF0ZS5wcm90b3R5cGUudG9HTVRTdHJpbmcgIT09ICJmdW5jdGlvbiIpICAkRVJST1IoJyMxOiB0eXBlb2YgRGF0ZS5wcm90b3R5cGUudG9HTVRTdHJpbmcgPT09ICJmdW5jdGlvbiIuIEFjdHVhbDogJyArICh0eXBlb2YgRGF0ZS5wcm90b3R5cGUudG9HTVRTdHJpbmcgKSk7CmlmICh0eXBlb2YgRGF0ZS5wcm90b3R5cGVbJ3RvR01UU3RyaW5nJ10gIT09ICJmdW5jdGlvbiIpICAkRVJST1IoJyMyOiB0eXBlb2YgRGF0ZS5wcm90b3R5cGVbInRvR01UU3RyaW5nIl0gPT09ICJmdW5jdGlvbiIuIEFjdHVhbDogJyArICh0eXBlb2YgRGF0ZS5wcm90b3R5cGVbInRvR01UU3RyaW5nIl0gKSk7CgoKCgo=", "commentary":"Check type of various properties", "description":"Checking properties of the Date object (toGMTString)", "path":"TestCases/annexB/B.2.6.propertyCheck.js" }, { "code":"Ly8vIENvcHlyaWdodCAoYykgMjAxMiBFY21hIEludGVybmF0aW9uYWwuICBBbGwgcmlnaHRzIHJlc2VydmVkLiANCi8qKg0KICogQHBhdGggdGVzdC9zdWl0ZS9hbm5leEIvQi5SZWdFeHAucHJvdG90eXBlLmNvbXBpbGUuanMNCiAqIEBkZXNjcmlwdGlvbiBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yIHJldHVybnMgZGF0YSBkZXNjIGZvciBmdW5jdGlvbnMgb24gYnVpbHQtaW5zIChSZWdFeHAucHJvdG90eXBlLmNvbXBpbGUpDQogKi8NCg0KDQpmdW5jdGlvbiB0ZXN0Y2FzZSgpIHsNCiAgdmFyIGRlc2MgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKFJlZ0V4cC5wcm90b3R5cGUsICJjb21waWxlIik7DQogIGlmIChkZXNjLnZhbHVlID09PSBSZWdFeHAucHJvdG90eXBlLmNvbXBpbGUgJiYNCiAgICAgIGRlc2Mud3JpdGFibGUgPT09IHRydWUgJiYNCiAgICAgIGRlc2MuZW51bWVyYWJsZSA9PT0gZmFsc2UgJiYNCiAgICAgIGRlc2MuY29uZmlndXJhYmxlID09PSB0cnVlKSB7DQogICAgcmV0dXJuIHRydWU7DQogIH0NCiB9DQpydW5UZXN0Q2FzZSh0ZXN0Y2FzZSk7DQo=", "commentary":"", "description":"Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.compile)", "path":"TestCases/annexB/B.RegExp.prototype.compile.js" } ] } }