diff options
Diffstat (limited to 'test/built-ins/String/prototype/S15.5.4_A2.js')
-rw-r--r-- | test/built-ins/String/prototype/S15.5.4_A2.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/built-ins/String/prototype/S15.5.4_A2.js b/test/built-ins/String/prototype/S15.5.4_A2.js new file mode 100644 index 000000000..e3efd8db9 --- /dev/null +++ b/test/built-ins/String/prototype/S15.5.4_A2.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: The String prototype object is itself not a String object +es5id: 15.5.4_A2 +description: Checking String.prototype +includes: [$FAIL.js] +---*/ + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +try { + (String.prototype !=""); + $FAIL('#1: "(String.prototype !="");" lead to throwing exception. Actual: '+(String.prototype !="")); +} catch (e) { + if (!(e instanceof TypeError)) { + $ERROR('#1.1: "(String.prototype !="")" lead to throwing exception. Exception is instance of TypeError. Actual: exception is '+e); + } +} + +// +////////////////////////////////////////////////////////////////////////////// |