Move S9.9_A1/2 to proper locations

The with statement tests were novel, but the tests for
property accessors throwing errors for undefined & null
were duplicates with S11.2.1_A3_T4/5 respectively.
This commit is contained in:
Brian Terlson 2014-11-28 14:28:42 -08:00
parent bf9830ee54
commit da465e7399
2 changed files with 2 additions and 26 deletions

View File

@ -3,23 +3,11 @@
/*--- /*---
info: ToObject conversion from undefined value must throw TypeError info: ToObject conversion from undefined value must throw TypeError
es5id: 9.9_A1 es5id: 12.10-2-4
description: Trying to convert undefined to Object description: Trying to convert undefined to Object
flags: [noStrict] flags: [noStrict]
---*/ ---*/
// CHECK#1
try{
undefined['foo'];
$ERROR('#1.1: undefined[\'foo\'] must throw TypeError. Actual: ' + (undefined['foo']));
}
catch(e){
if((e instanceof TypeError) !== true){
$ERROR('#1.2: undefined[\'foo\'] must throw TypeError. Actual: ' + (e));
}
}
// CHECK#2
try{ try{
with(undefined) x = 2; with(undefined) x = 2;
$ERROR('#2.1: with(undefined) x = 2 must throw TypeError. Actual: x === ' + (x)); $ERROR('#2.1: with(undefined) x = 2 must throw TypeError. Actual: x === ' + (x));

View File

@ -3,23 +3,11 @@
/*--- /*---
info: ToObject conversion from null value must throw TypeError info: ToObject conversion from null value must throw TypeError
es5id: 9.9_A2 es5id: 12.10-2-5
description: Trying to convert null to Object description: Trying to convert null to Object
flags: [noStrict] flags: [noStrict]
---*/ ---*/
// CHECK#1
try{
null['foo'];
$ERROR('#1.1: null[\'foo\'] throw TypeError. Actual: ' + (null['foo']));
}
catch(e){
if((e instanceof TypeError) !== true){
$ERROR('#1.2: null[\'foo\'] must throw TypeError. Actual: ' + (e));
}
}
// CHECK#2
try{ try{
with(null) x = 2; with(null) x = 2;
$ERROR('#2.1: with(null) x = 2 must throw TypeError. Actual: x === . Actual: ' + (x)); $ERROR('#2.1: with(null) x = 2 must throw TypeError. Actual: x === . Actual: ' + (x));