diff options
Diffstat (limited to 'test/built-ins/String/prototype/charAt/S15.5.4.4_A11.js')
-rw-r--r-- | test/built-ins/String/prototype/charAt/S15.5.4.4_A11.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/built-ins/String/prototype/charAt/S15.5.4.4_A11.js b/test/built-ins/String/prototype/charAt/S15.5.4.4_A11.js new file mode 100644 index 000000000..bb5b5cb34 --- /dev/null +++ b/test/built-ins/String/prototype/charAt/S15.5.4.4_A11.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: The length property of the charAt method is 1 +es5id: 15.5.4.4_A11 +description: Checking String.prototype.charAt.length +---*/ + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if (!(String.prototype.charAt.hasOwnProperty("length"))) { + $ERROR('#1: String.prototype.charAt.hasOwnProperty("length") return true. Actual: '+String.prototype.charAt.hasOwnProperty("length")); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +if (String.prototype.charAt.length !== 1) { + $ERROR('#2: String.prototype.charAt.length === 1. Actual: '+String.prototype.charAt.length ); +} +// +////////////////////////////////////////////////////////////////////////////// |