summaryrefslogtreecommitdiff
path: root/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js')
-rw-r--r--test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js31
1 files changed, 21 insertions, 10 deletions
diff --git a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js
index fec80696c..6df1e9860 100644
--- a/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js
+++ b/test/built-ins/String/prototype/lastIndexOf/S15.5.4.8_A4_T2.js
@@ -11,19 +11,30 @@ description: >
exception
---*/
-var __obj = {toString:function(){return "\u0041B";}}
-var __obj2 = {valueOf:function(){return {};},toString:function(){throw "intointeger";}}
+var __obj = {
+ toString: function() {
+ return "\u0041B";
+ }
+}
+var __obj2 = {
+ valueOf: function() {
+ return {};
+ },
+ toString: function() {
+ throw "intointeger";
+ }
+}
var __str = new String("ABB\u0041BABAB");
//////////////////////////////////////////////////////////////////////////////
//CHECK#1
- try {
- var x = __str.lastIndexOf(__obj, __obj2);
- $ERROR('#1: var x = __str.lastIndexOf(__obj, __obj2) lead to throwing exception');
- } catch (e) {
- if (e!=="intointeger") {
- $ERROR('#1.1: Exception === "intointeger". Actual: '+e);
- }
- }
+try {
+ var x = __str.lastIndexOf(__obj, __obj2);
+ $ERROR('#1: var x = __str.lastIndexOf(__obj, __obj2) lead to throwing exception');
+} catch (e) {
+ if (e !== "intointeger") {
+ $ERROR('#1.1: Exception === "intointeger". Actual: ' + e);
+ }
+}
//
//////////////////////////////////////////////////////////////////////////////