From 717bcbaedd1f97e2d2b97ca3bde28c80b1ac2c13 Mon Sep 17 00:00:00 2001 From: rwaldron Date: Wed, 18 Aug 2021 12:00:28 -0400 Subject: [PATCH] Transform legacy format to harness assertions: test/built-ins/R*/**/*.js --- test/built-ins/RegExp/S15.10.1_A1_T1.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T10.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T11.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T12.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T13.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T14.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T15.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T16.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T2.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T3.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T4.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T5.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T6.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T7.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T8.js | 13 ++-- test/built-ins/RegExp/S15.10.1_A1_T9.js | 13 ++-- test/built-ins/RegExp/S15.10.2.10_A1.1_T1.js | 2 - test/built-ins/RegExp/S15.10.2.10_A1.2_T1.js | 2 - test/built-ins/RegExp/S15.10.2.10_A1.3_T1.js | 2 - test/built-ins/RegExp/S15.10.2.10_A1.4_T1.js | 2 - test/built-ins/RegExp/S15.10.2.10_A1.5_T1.js | 2 - test/built-ins/RegExp/S15.10.2.10_A2.1_T1.js | 7 +- test/built-ins/RegExp/S15.10.2.10_A2.1_T2.js | 7 +- test/built-ins/RegExp/S15.10.2.10_A3.1_T1.js | 4 -- test/built-ins/RegExp/S15.10.2.10_A3.1_T2.js | 10 +-- test/built-ins/RegExp/S15.10.2.10_A4.1_T1.js | 6 -- test/built-ins/RegExp/S15.10.2.10_A4.1_T2.js | 10 +-- test/built-ins/RegExp/S15.10.2.10_A4.1_T3.js | 10 +-- test/built-ins/RegExp/S15.10.2.10_A5.1_T1.js | 1 - test/built-ins/RegExp/S15.10.2.11_A1_T1.js | 2 - test/built-ins/RegExp/S15.10.2.11_A1_T4.js | 2 - test/built-ins/RegExp/S15.10.2.11_A1_T5.js | 2 - test/built-ins/RegExp/S15.10.2.11_A1_T6.js | 3 - test/built-ins/RegExp/S15.10.2.11_A1_T7.js | 3 - test/built-ins/RegExp/S15.10.2.11_A1_T8.js | 4 +- test/built-ins/RegExp/S15.10.2.11_A1_T9.js | 4 +- test/built-ins/RegExp/S15.10.2.12_A3_T5.js | 15 ++-- test/built-ins/RegExp/S15.10.2.12_A4_T5.js | 15 ++-- test/built-ins/RegExp/S15.10.2.13_A1_T1.js | 8 +-- test/built-ins/RegExp/S15.10.2.13_A1_T10.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A1_T11.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A1_T12.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A1_T13.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A1_T14.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A1_T15.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A1_T17.js | 5 +- test/built-ins/RegExp/S15.10.2.13_A1_T2.js | 8 +-- test/built-ins/RegExp/S15.10.2.13_A1_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A1_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A1_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A1_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A1_T7.js | 5 +- test/built-ins/RegExp/S15.10.2.13_A1_T8.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A1_T9.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A2_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A2_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A2_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A2_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A2_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A2_T6.js | 5 +- test/built-ins/RegExp/S15.10.2.13_A2_T7.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A2_T8.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A3_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A3_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A3_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.13_A3_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.15_A1_T1.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T10.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T11.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T12.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T13.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T14.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T15.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T16.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T17.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T18.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T19.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T2.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T20.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T21.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T22.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T23.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T24.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T25.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T26.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T27.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T28.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T29.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T3.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T30.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T31.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T32.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T33.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T34.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T35.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T36.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T37.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T38.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T39.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T4.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T40.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T41.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T5.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T6.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T7.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T8.js | 11 +-- test/built-ins/RegExp/S15.10.2.15_A1_T9.js | 11 +-- test/built-ins/RegExp/S15.10.2.3_A1_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T10.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T11.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T12.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T13.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T14.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T15.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T16.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T17.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T5.js | 5 +- test/built-ins/RegExp/S15.10.2.3_A1_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T7.js | 5 +- test/built-ins/RegExp/S15.10.2.3_A1_T8.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.3_A1_T9.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.5_A1_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.5_A1_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.5_A1_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.5_A1_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.5_A1_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A1_T1.js | 5 +- test/built-ins/RegExp/S15.10.2.6_A1_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A1_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A1_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A1_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A2_T1.js | 5 +- test/built-ins/RegExp/S15.10.2.6_A2_T10.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A2_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A2_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A2_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A2_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A2_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A2_T7.js | 5 +- test/built-ins/RegExp/S15.10.2.6_A2_T8.js | 5 +- test/built-ins/RegExp/S15.10.2.6_A2_T9.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A3_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A3_T10.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A3_T11.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A3_T12.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A3_T13.js | 5 +- test/built-ins/RegExp/S15.10.2.6_A3_T14.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A3_T15.js | 5 +- test/built-ins/RegExp/S15.10.2.6_A3_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A3_T3.js | 5 +- test/built-ins/RegExp/S15.10.2.6_A3_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A3_T5.js | 5 +- test/built-ins/RegExp/S15.10.2.6_A3_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A3_T7.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A3_T8.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A3_T9.js | 5 +- test/built-ins/RegExp/S15.10.2.6_A4_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A4_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A4_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A4_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A4_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A4_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A4_T7.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A4_T8.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A5_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A5_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A6_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A6_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A6_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.6_A6_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A1_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A1_T10.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A1_T11.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A1_T12.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A1_T2.js | 5 +- test/built-ins/RegExp/S15.10.2.7_A1_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A1_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A1_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A1_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A1_T7.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A1_T8.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A1_T9.js | 5 +- test/built-ins/RegExp/S15.10.2.7_A2_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A2_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A2_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A2_T4.js | 5 +- test/built-ins/RegExp/S15.10.2.7_A3_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A3_T10.js | 5 +- test/built-ins/RegExp/S15.10.2.7_A3_T11.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A3_T12.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A3_T13.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A3_T14.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A3_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A3_T3.js | 5 +- test/built-ins/RegExp/S15.10.2.7_A3_T4.js | 5 +- test/built-ins/RegExp/S15.10.2.7_A3_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A3_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A3_T7.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A3_T8.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A3_T9.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T10.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T11.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T12.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T13.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T14.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T15.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T16.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T17.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T18.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T19.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T20.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T21.js | 5 +- test/built-ins/RegExp/S15.10.2.7_A4_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T7.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A4_T8.js | 5 +- test/built-ins/RegExp/S15.10.2.7_A4_T9.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A5_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A5_T10.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A5_T11.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A5_T12.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A5_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A5_T3.js | 5 +- test/built-ins/RegExp/S15.10.2.7_A5_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A5_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A5_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A5_T7.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A5_T8.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A5_T9.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A6_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A6_T2.js | 5 +- test/built-ins/RegExp/S15.10.2.7_A6_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A6_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A6_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.7_A6_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A1_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A1_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A1_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A1_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A1_T5.js | 5 +- test/built-ins/RegExp/S15.10.2.8_A2_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A2_T10.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A2_T11.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A2_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A2_T3.js | 5 +- test/built-ins/RegExp/S15.10.2.8_A2_T4.js | 5 +- test/built-ins/RegExp/S15.10.2.8_A2_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A2_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A2_T7.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A2_T8.js | 5 +- test/built-ins/RegExp/S15.10.2.8_A2_T9.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T10.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T11.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T12.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T13.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T14.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T15.js | 42 ++++++----- test/built-ins/RegExp/S15.10.2.8_A3_T16.js | 42 ++++++----- test/built-ins/RegExp/S15.10.2.8_A3_T17.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T18.js | 5 +- test/built-ins/RegExp/S15.10.2.8_A3_T19.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T20.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T21.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T22.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T23.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T24.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T25.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T26.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T27.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T28.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T29.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T3.js | 5 +- test/built-ins/RegExp/S15.10.2.8_A3_T30.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T31.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T32.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T33.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T7.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T8.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A3_T9.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A4_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A4_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A4_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A4_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A4_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A4_T6.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A4_T7.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A4_T8.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A4_T9.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A5_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.8_A5_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.9_A1_T1.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.9_A1_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.9_A1_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.2.9_A1_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.2_A1_T1.js | 9 +-- test/built-ins/RegExp/S15.10.3.1_A1_T1.js | 5 +- test/built-ins/RegExp/S15.10.3.1_A1_T2.js | 5 +- test/built-ins/RegExp/S15.10.3.1_A1_T3.js | 5 +- test/built-ins/RegExp/S15.10.3.1_A1_T4.js | 5 +- test/built-ins/RegExp/S15.10.3.1_A1_T5.js | 5 +- test/built-ins/RegExp/S15.10.3.1_A2_T1.js | 13 ++-- test/built-ins/RegExp/S15.10.3.1_A2_T2.js | 13 ++-- test/built-ins/RegExp/S15.10.3.1_A3_T1.js | 14 ++-- test/built-ins/RegExp/S15.10.3.1_A3_T2.js | 14 ++-- test/built-ins/RegExp/S15.10.4.1_A1_T1.js | 38 +++++----- test/built-ins/RegExp/S15.10.4.1_A1_T2.js | 36 +++++----- test/built-ins/RegExp/S15.10.4.1_A1_T3.js | 36 +++++----- test/built-ins/RegExp/S15.10.4.1_A1_T4.js | 36 +++++----- test/built-ins/RegExp/S15.10.4.1_A1_T5.js | 36 +++++----- test/built-ins/RegExp/S15.10.4.1_A2_T1.js | 1 - test/built-ins/RegExp/S15.10.4.1_A2_T2.js | 11 +-- test/built-ins/RegExp/S15.10.4.1_A3_T1.js | 17 +---- test/built-ins/RegExp/S15.10.4.1_A3_T2.js | 17 +---- test/built-ins/RegExp/S15.10.4.1_A3_T3.js | 17 +---- test/built-ins/RegExp/S15.10.4.1_A3_T4.js | 17 +---- test/built-ins/RegExp/S15.10.4.1_A3_T5.js | 17 +---- test/built-ins/RegExp/S15.10.4.1_A4_T1.js | 23 ++---- test/built-ins/RegExp/S15.10.4.1_A4_T2.js | 17 +---- test/built-ins/RegExp/S15.10.4.1_A4_T3.js | 17 +---- test/built-ins/RegExp/S15.10.4.1_A4_T4.js | 23 ++---- test/built-ins/RegExp/S15.10.4.1_A4_T5.js | 17 +---- test/built-ins/RegExp/S15.10.4.1_A5_T1.js | 13 ++-- test/built-ins/RegExp/S15.10.4.1_A5_T3.js | 13 ++-- test/built-ins/RegExp/S15.10.4.1_A5_T4.js | 13 ++-- test/built-ins/RegExp/S15.10.4.1_A5_T6.js | 13 ++-- test/built-ins/RegExp/S15.10.4.1_A5_T7.js | 13 ++-- test/built-ins/RegExp/S15.10.4.1_A5_T8.js | 13 ++-- test/built-ins/RegExp/S15.10.4.1_A5_T9.js | 13 ++-- test/built-ins/RegExp/S15.10.4.1_A6_T1.js | 5 +- test/built-ins/RegExp/S15.10.4.1_A7_T1.js | 5 +- test/built-ins/RegExp/S15.10.4.1_A7_T2.js | 9 +-- test/built-ins/RegExp/S15.10.4.1_A8_T1.js | 29 ++------ test/built-ins/RegExp/S15.10.4.1_A8_T10.js | 29 ++------ test/built-ins/RegExp/S15.10.4.1_A8_T11.js | 29 ++------ test/built-ins/RegExp/S15.10.4.1_A8_T12.js | 9 ++- test/built-ins/RegExp/S15.10.4.1_A8_T13.js | 9 ++- test/built-ins/RegExp/S15.10.4.1_A8_T2.js | 29 ++------ test/built-ins/RegExp/S15.10.4.1_A8_T3.js | 29 ++------ test/built-ins/RegExp/S15.10.4.1_A8_T4.js | 29 ++------ test/built-ins/RegExp/S15.10.4.1_A8_T5.js | 29 ++------ test/built-ins/RegExp/S15.10.4.1_A8_T6.js | 9 ++- test/built-ins/RegExp/S15.10.4.1_A8_T7.js | 9 ++- test/built-ins/RegExp/S15.10.4.1_A8_T8.js | 9 ++- test/built-ins/RegExp/S15.10.4.1_A8_T9.js | 29 ++------ test/built-ins/RegExp/S15.10.4.1_A9_T1.js | 13 ++-- test/built-ins/RegExp/S15.10.4.1_A9_T2.js | 13 ++-- test/built-ins/RegExp/S15.10.4.1_A9_T3.js | 13 ++-- test/built-ins/RegExp/S15.10.5_A1.js | 6 +- test/built-ins/RegExp/S15.10.5_A2_T1.js | 10 +-- test/built-ins/RegExp/S15.10.5_A2_T2.js | 5 +- test/built-ins/RegExp/S15.10.7_A1_T1.js | 13 ++-- test/built-ins/RegExp/S15.10.7_A1_T2.js | 11 +-- test/built-ins/RegExp/S15.10.7_A2_T1.js | 11 +-- test/built-ins/RegExp/S15.10.7_A2_T2.js | 11 +-- test/built-ins/RegExp/S15.10.7_A3_T1.js | 20 ++---- test/built-ins/RegExp/S15.10.7_A3_T2.js | 20 ++---- .../RegExp/prototype/S15.10.5.1_A1.js | 6 +- .../RegExp/prototype/S15.10.5.1_A2.js | 26 ++++--- .../RegExp/prototype/S15.10.5.1_A3.js | 21 +++--- .../RegExp/prototype/S15.10.5.1_A4.js | 13 ++-- .../RegExp/prototype/S15.10.6.1_A1_T1.js | 10 +-- .../RegExp/prototype/S15.10.6.1_A1_T2.js | 18 ++--- .../RegExp/prototype/S15.10.6_A1_T1.js | 10 +-- .../RegExp/prototype/S15.10.6_A1_T2.js | 5 +- .../RegExp/prototype/exec/S15.10.6.2_A10.js | 21 +++--- .../RegExp/prototype/exec/S15.10.6.2_A11.js | 15 ++-- .../RegExp/prototype/exec/S15.10.6.2_A12.js | 8 +-- .../RegExp/prototype/exec/S15.10.6.2_A1_T1.js | 45 ++++++------ .../prototype/exec/S15.10.6.2_A1_T10.js | 45 ++++++------ .../prototype/exec/S15.10.6.2_A1_T11.js | 45 ++++++------ .../prototype/exec/S15.10.6.2_A1_T12.js | 45 ++++++------ .../prototype/exec/S15.10.6.2_A1_T13.js | 45 ++++++------ .../prototype/exec/S15.10.6.2_A1_T14.js | 45 ++++++------ .../prototype/exec/S15.10.6.2_A1_T15.js | 45 ++++++------ .../prototype/exec/S15.10.6.2_A1_T16.js | 4 +- .../prototype/exec/S15.10.6.2_A1_T17.js | 45 ++++++------ .../prototype/exec/S15.10.6.2_A1_T18.js | 45 ++++++------ .../prototype/exec/S15.10.6.2_A1_T19.js | 45 ++++++------ .../RegExp/prototype/exec/S15.10.6.2_A1_T2.js | 45 ++++++------ .../prototype/exec/S15.10.6.2_A1_T20.js | 45 ++++++------ .../prototype/exec/S15.10.6.2_A1_T21.js | 45 ++++++------ .../RegExp/prototype/exec/S15.10.6.2_A1_T3.js | 45 ++++++------ .../RegExp/prototype/exec/S15.10.6.2_A1_T4.js | 45 ++++++------ .../RegExp/prototype/exec/S15.10.6.2_A1_T5.js | 45 ++++++------ .../RegExp/prototype/exec/S15.10.6.2_A1_T6.js | 45 ++++++------ .../RegExp/prototype/exec/S15.10.6.2_A1_T7.js | 9 ++- .../RegExp/prototype/exec/S15.10.6.2_A1_T8.js | 7 +- .../RegExp/prototype/exec/S15.10.6.2_A1_T9.js | 7 +- .../RegExp/prototype/exec/S15.10.6.2_A2_T1.js | 13 ++-- .../prototype/exec/S15.10.6.2_A2_T10.js | 13 ++-- .../RegExp/prototype/exec/S15.10.6.2_A2_T2.js | 13 ++-- .../RegExp/prototype/exec/S15.10.6.2_A2_T3.js | 13 ++-- .../RegExp/prototype/exec/S15.10.6.2_A2_T4.js | 15 ++-- .../RegExp/prototype/exec/S15.10.6.2_A2_T5.js | 11 +-- .../RegExp/prototype/exec/S15.10.6.2_A2_T6.js | 13 ++-- .../RegExp/prototype/exec/S15.10.6.2_A2_T7.js | 13 ++-- .../RegExp/prototype/exec/S15.10.6.2_A2_T8.js | 13 ++-- .../RegExp/prototype/exec/S15.10.6.2_A2_T9.js | 13 ++-- .../RegExp/prototype/exec/S15.10.6.2_A3_T1.js | 18 ++--- .../RegExp/prototype/exec/S15.10.6.2_A3_T2.js | 13 ++-- .../RegExp/prototype/exec/S15.10.6.2_A3_T3.js | 17 ++--- .../RegExp/prototype/exec/S15.10.6.2_A3_T4.js | 17 ++--- .../RegExp/prototype/exec/S15.10.6.2_A3_T5.js | 22 +++--- .../RegExp/prototype/exec/S15.10.6.2_A3_T6.js | 22 +++--- .../RegExp/prototype/exec/S15.10.6.2_A3_T7.js | 22 +++--- .../RegExp/prototype/exec/S15.10.6.2_A4_T1.js | 72 ++++++++++--------- .../prototype/exec/S15.10.6.2_A4_T10.js | 72 ++++++++++--------- .../prototype/exec/S15.10.6.2_A4_T11.js | 43 +++++------ .../prototype/exec/S15.10.6.2_A4_T12.js | 72 ++++++++++--------- .../RegExp/prototype/exec/S15.10.6.2_A4_T2.js | 72 ++++++++++--------- .../RegExp/prototype/exec/S15.10.6.2_A4_T3.js | 72 ++++++++++--------- .../RegExp/prototype/exec/S15.10.6.2_A4_T4.js | 72 ++++++++++--------- .../RegExp/prototype/exec/S15.10.6.2_A4_T5.js | 72 ++++++++++--------- .../RegExp/prototype/exec/S15.10.6.2_A4_T6.js | 72 ++++++++++--------- .../RegExp/prototype/exec/S15.10.6.2_A4_T7.js | 72 ++++++++++--------- .../RegExp/prototype/exec/S15.10.6.2_A4_T8.js | 72 ++++++++++--------- .../RegExp/prototype/exec/S15.10.6.2_A4_T9.js | 72 ++++++++++--------- .../RegExp/prototype/exec/S15.10.6.2_A5_T1.js | 47 ++++++------ .../RegExp/prototype/exec/S15.10.6.2_A5_T2.js | 11 +-- .../RegExp/prototype/exec/S15.10.6.2_A5_T3.js | 22 ++---- .../RegExp/prototype/exec/S15.10.6.2_A6.js | 10 +-- .../RegExp/prototype/exec/S15.10.6.2_A7.js | 10 ++- .../RegExp/prototype/exec/S15.10.6.2_A8.js | 30 ++++---- .../RegExp/prototype/exec/S15.10.6.2_A9.js | 28 ++++---- .../RegExp/prototype/global/S15.10.7.2_A10.js | 10 +-- .../RegExp/prototype/global/S15.10.7.2_A8.js | 25 ++++--- .../RegExp/prototype/global/S15.10.7.2_A9.js | 17 ++--- .../prototype/ignoreCase/S15.10.7.3_A10.js | 14 ++-- .../prototype/ignoreCase/S15.10.7.3_A8.js | 25 ++++--- .../prototype/ignoreCase/S15.10.7.3_A9.js | 17 ++--- .../prototype/multiline/S15.10.7.4_A10.js | 10 +-- .../prototype/multiline/S15.10.7.4_A8.js | 25 ++++--- .../prototype/multiline/S15.10.7.4_A9.js | 17 ++--- .../RegExp/prototype/test/S15.10.6.3_A10.js | 21 +++--- .../RegExp/prototype/test/S15.10.6.3_A11.js | 15 ++-- .../RegExp/prototype/test/S15.10.6.3_A1_T1.js | 9 +-- .../prototype/test/S15.10.6.3_A1_T10.js | 9 +-- .../prototype/test/S15.10.6.3_A1_T11.js | 9 +-- .../prototype/test/S15.10.6.3_A1_T12.js | 9 +-- .../prototype/test/S15.10.6.3_A1_T13.js | 9 +-- .../prototype/test/S15.10.6.3_A1_T14.js | 9 +-- .../prototype/test/S15.10.6.3_A1_T15.js | 9 +-- .../prototype/test/S15.10.6.3_A1_T16.js | 5 +- .../prototype/test/S15.10.6.3_A1_T17.js | 5 +- .../prototype/test/S15.10.6.3_A1_T18.js | 9 +-- .../prototype/test/S15.10.6.3_A1_T19.js | 9 +-- .../RegExp/prototype/test/S15.10.6.3_A1_T2.js | 9 +-- .../prototype/test/S15.10.6.3_A1_T20.js | 5 +- .../prototype/test/S15.10.6.3_A1_T21.js | 9 +-- .../prototype/test/S15.10.6.3_A1_T22.js | 22 ++---- .../RegExp/prototype/test/S15.10.6.3_A1_T3.js | 9 +-- .../RegExp/prototype/test/S15.10.6.3_A1_T4.js | 9 +-- .../RegExp/prototype/test/S15.10.6.3_A1_T5.js | 9 +-- .../RegExp/prototype/test/S15.10.6.3_A1_T6.js | 9 +-- .../RegExp/prototype/test/S15.10.6.3_A1_T7.js | 9 ++- .../RegExp/prototype/test/S15.10.6.3_A1_T8.js | 7 +- .../RegExp/prototype/test/S15.10.6.3_A1_T9.js | 11 +-- .../RegExp/prototype/test/S15.10.6.3_A2_T1.js | 11 +-- .../prototype/test/S15.10.6.3_A2_T10.js | 11 +-- .../RegExp/prototype/test/S15.10.6.3_A2_T2.js | 11 +-- .../RegExp/prototype/test/S15.10.6.3_A2_T3.js | 11 +-- .../RegExp/prototype/test/S15.10.6.3_A2_T4.js | 13 ++-- .../RegExp/prototype/test/S15.10.6.3_A2_T5.js | 11 +-- .../RegExp/prototype/test/S15.10.6.3_A2_T6.js | 11 +-- .../RegExp/prototype/test/S15.10.6.3_A2_T7.js | 11 +-- .../RegExp/prototype/test/S15.10.6.3_A2_T8.js | 11 +-- .../RegExp/prototype/test/S15.10.6.3_A2_T9.js | 11 +-- .../RegExp/prototype/test/S15.10.6.3_A6.js | 10 +-- .../RegExp/prototype/test/S15.10.6.3_A7.js | 10 ++- .../RegExp/prototype/test/S15.10.6.3_A8.js | 30 ++++---- .../RegExp/prototype/test/S15.10.6.3_A9.js | 28 ++++---- .../prototype/toString/S15.10.6.4_A10.js | 21 +++--- .../prototype/toString/S15.10.6.4_A11.js | 19 ++--- .../prototype/toString/S15.10.6.4_A6.js | 10 +-- .../prototype/toString/S15.10.6.4_A7.js | 14 ++-- .../prototype/toString/S15.10.6.4_A8.js | 30 ++++---- .../prototype/toString/S15.10.6.4_A9.js | 28 ++++---- 489 files changed, 6296 insertions(+), 5579 deletions(-) diff --git a/test/built-ins/RegExp/S15.10.1_A1_T1.js b/test/built-ins/RegExp/S15.10.1_A1_T1.js index 20ff06134a..a43e3d2983 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T1.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T1 description: Tested RegExp is "a**" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("a**") throw SyntaxError. Actual: ' + (new RegExp("a**"))); + throw new Test262Error('#1.1: new RegExp("a**") throw SyntaxError. Actual: ' + (new RegExp("a**"))); } catch (e) { - if ((e instanceof SyntaxError !== true)) { - throw new Test262Error('#1.2: new RegExp("a**") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T10.js b/test/built-ins/RegExp/S15.10.1_A1_T10.js index 9a7796c8ce..76279d3407 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T10.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T10.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T10 description: Tested RegExp is "++a" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("++a") throw SyntaxError. Actual: ' + (new RegExp("++a"))); + throw new Test262Error('#1.1: new RegExp("++a") throw SyntaxError. Actual: ' + (new RegExp("++a"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("++a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T11.js b/test/built-ins/RegExp/S15.10.1_A1_T11.js index c08950dee7..c0f65b9b1d 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T11.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T11.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T11 description: Tested RegExp is "?a" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("?a") throw SyntaxError. Actual: ' + (new RegExp("?a"))); + throw new Test262Error('#1.1: new RegExp("?a") throw SyntaxError. Actual: ' + (new RegExp("?a"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("?a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T12.js b/test/built-ins/RegExp/S15.10.1_A1_T12.js index 1a6fb3fc14..0712273327 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T12.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T12.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T12 description: Tested RegExp is "??a" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("??a") throw SyntaxError. Actual: ' + (new RegExp("??a"))); + throw new Test262Error('#1.1: new RegExp("??a") throw SyntaxError. Actual: ' + (new RegExp("??a"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("??a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T13.js b/test/built-ins/RegExp/S15.10.1_A1_T13.js index 9575c08edb..bdd1cb21d0 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T13.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T13.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T13 description: Tested RegExp is "x{1}{1,}" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("x{1}{1,}") throw SyntaxError. Actual: ' + (new RegExp("x{1}{1,}"))); + throw new Test262Error('#1.1: new RegExp("x{1}{1,}") throw SyntaxError. Actual: ' + (new RegExp("x{1}{1,}"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("x{1}{1,}") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T14.js b/test/built-ins/RegExp/S15.10.1_A1_T14.js index 62d1db6f52..f821999ba4 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T14.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T14.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T14 description: Tested RegExp is "x{1,2}{1}" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("x{1,2}{1}") throw SyntaxError. Actual: ' + (new RegExp("x{1,2}{1}"))); + throw new Test262Error('#1.1: new RegExp("x{1,2}{1}") throw SyntaxError. Actual: ' + (new RegExp("x{1,2}{1}"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("x{1,2}{1}") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T15.js b/test/built-ins/RegExp/S15.10.1_A1_T15.js index 3c1265ec56..14e76c6b68 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T15.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T15.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T15 description: Tested RegExp is "x{1,}{1}" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("x{1,}{1}") throw SyntaxError. Actual: ' + (new RegExp("x{1,}{1}"))); + throw new Test262Error('#1.1: new RegExp("x{1,}{1}") throw SyntaxError. Actual: ' + (new RegExp("x{1,}{1}"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("x{1,}{1}") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T16.js b/test/built-ins/RegExp/S15.10.1_A1_T16.js index e2ba74cabb..4ede7a3a43 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T16.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T16.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T16 description: Tested RegExp is "x{0,1}{1,}" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("x{0,1}{1,}") throw SyntaxError. Actual: ' + (new RegExp("x{0,1}{1,}"))); + throw new Test262Error('#1.1: new RegExp("x{0,1}{1,}") throw SyntaxError. Actual: ' + (new RegExp("x{0,1}{1,}"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("x{0,1}{1,}") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T2.js b/test/built-ins/RegExp/S15.10.1_A1_T2.js index 70eaedc47d..08c78077a9 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T2.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T2 description: Tested RegExp is "a***" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("a***") throw SyntaxError. Actual: ' + (new RegExp("a***"))); + throw new Test262Error('#1.1: new RegExp("a***") throw SyntaxError. Actual: ' + (new RegExp("a***"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("a***") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T3.js b/test/built-ins/RegExp/S15.10.1_A1_T3.js index 2d87505fb5..b3828503f7 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T3.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T3.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T3 description: Tested RegExp is "a++" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("a++") throw SyntaxError. Actual: ' + (new RegExp("a++"))); + throw new Test262Error('#1.1: new RegExp("a++") throw SyntaxError. Actual: ' + (new RegExp("a++"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("a++") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T4.js b/test/built-ins/RegExp/S15.10.1_A1_T4.js index 6dc03c99ac..10c54d82e2 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T4.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T4.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T4 description: Tested RegExp is "a+++" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("a+++") throw SyntaxError. Actual: ' + (new RegExp("a+++"))); + throw new Test262Error('#1.1: new RegExp("a+++") throw SyntaxError. Actual: ' + (new RegExp("a+++"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("a+++") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T5.js b/test/built-ins/RegExp/S15.10.1_A1_T5.js index 49d030a737..a23adfdda9 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T5.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T5 description: Tested RegExp is "a???" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("a???") throw SyntaxError. Actual: ' + (new RegExp("a???"))); + throw new Test262Error('#1.1: new RegExp("a???") throw SyntaxError. Actual: ' + (new RegExp("a???"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("a???") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T6.js b/test/built-ins/RegExp/S15.10.1_A1_T6.js index c6237b8c8f..c0d77407c0 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T6.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T6.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T6 description: Tested RegExp is "a????" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("a????") throw SyntaxError. Actual: ' + (new RegExp("a????"))); + throw new Test262Error('#1.1: new RegExp("a????") throw SyntaxError. Actual: ' + (new RegExp("a????"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("a????") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T7.js b/test/built-ins/RegExp/S15.10.1_A1_T7.js index be112b4b0d..574eb0313d 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T7.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T7.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T7 description: Tested RegExp is "*a" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("*a") throw SyntaxError. Actual: ' + (new RegExp("*a"))); + throw new Test262Error('#1.1: new RegExp("*a") throw SyntaxError. Actual: ' + (new RegExp("*a"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("*a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T8.js b/test/built-ins/RegExp/S15.10.1_A1_T8.js index 6fe823b8ce..0ae23602f4 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T8.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T8.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T8 description: Tested RegExp is "**a" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("**a") throw SyntaxError. Actual: ' + (new RegExp("**a"))); + throw new Test262Error('#1.1: new RegExp("**a") throw SyntaxError. Actual: ' + (new RegExp("**a"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("**a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.1_A1_T9.js b/test/built-ins/RegExp/S15.10.1_A1_T9.js index 4f520d5696..24bf179cb5 100644 --- a/test/built-ins/RegExp/S15.10.1_A1_T9.js +++ b/test/built-ins/RegExp/S15.10.1_A1_T9.js @@ -7,11 +7,14 @@ es5id: 15.10.1_A1_T9 description: Tested RegExp is "+a" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("+a") throw SyntaxError. Actual: ' + (new RegExp("+a"))); + throw new Test262Error('#1.1: new RegExp("+a") throw SyntaxError. Actual: ' + (new RegExp("+a"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("+a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.10_A1.1_T1.js b/test/built-ins/RegExp/S15.10.2.10_A1.1_T1.js index 45fd18d7af..0df0436fba 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A1.1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.10_A1.1_T1.js @@ -9,13 +9,11 @@ es5id: 15.10.2.10_A1.1_T1 description: Use \t in RegExp and \u0009 in tested string ---*/ -//CHECK#1 var arr = /\t/.exec("\u0009"); if ((arr === null) || (arr[0] !== "\u0009")) { throw new Test262Error('#1: var arr = /\\t/.exec("\\u0009"); arr[0] === "\\u0009". Actual. ' + (arr && arr[0])); } -//CHECK#2 var arr = /\t\t/.exec("a\u0009\u0009b"); if ((arr === null) || (arr[0] !== "\u0009\u0009")) { throw new Test262Error('#2: var arr = /\\t\\t/.exec("a\\u0009\\u0009b"); arr[0] === "\\u0009\\u0009". Actual. ' + (arr && arr[0])); diff --git a/test/built-ins/RegExp/S15.10.2.10_A1.2_T1.js b/test/built-ins/RegExp/S15.10.2.10_A1.2_T1.js index a6e201d3fa..34efaf9895 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A1.2_T1.js +++ b/test/built-ins/RegExp/S15.10.2.10_A1.2_T1.js @@ -9,13 +9,11 @@ es5id: 15.10.2.10_A1.2_T1 description: Use \n in RegExp and \u000A in tested string ---*/ -//CHECK#1 var arr = /\n/.exec("\u000A"); if ((arr === null) || (arr[0] !== "\u000A")) { throw new Test262Error('#1: var arr = /\\n/.exec("\\u000A"); arr[0] === "\\u000A". Actual. ' + (arr && arr[0])); } -//CHECK#2 var arr = /\n\n/.exec("a\u000A\u000Ab"); if ((arr === null) || (arr[0] !== "\u000A\u000A")) { throw new Test262Error('#2: var arr = /\\n\\n/.exec("a\\u000A\\u000Ab"); arr[0] === "\\u000A\\u000A". Actual. ' + (arr && arr[0])); diff --git a/test/built-ins/RegExp/S15.10.2.10_A1.3_T1.js b/test/built-ins/RegExp/S15.10.2.10_A1.3_T1.js index 3b0e954e19..784b11a26f 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A1.3_T1.js +++ b/test/built-ins/RegExp/S15.10.2.10_A1.3_T1.js @@ -9,13 +9,11 @@ es5id: 15.10.2.10_A1.3_T1 description: Use \v in RegExp and \u000B in tested string ---*/ -//CHECK#1 var arr = /\v/.exec("\u000B"); if ((arr === null) || (arr[0] !== "\u000B")) { throw new Test262Error('#1: var arr = /\\v/.exec("\\u000B"); arr[0] === "\\u000B". Actual. ' + (arr && arr[0])); } -//CHECK#2 var arr = /\v\v/.exec("a\u000B\u000Bb"); if ((arr === null) || (arr[0] !== "\u000B\u000B")) { throw new Test262Error('#2: var arr = /\\v\\v/.exec("a\\u000B\\u000Bb"); arr[0] === "\\u000B\\u000B". Actual. ' + (arr && arr[0])); diff --git a/test/built-ins/RegExp/S15.10.2.10_A1.4_T1.js b/test/built-ins/RegExp/S15.10.2.10_A1.4_T1.js index d9e33f1112..45a8588e72 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A1.4_T1.js +++ b/test/built-ins/RegExp/S15.10.2.10_A1.4_T1.js @@ -9,13 +9,11 @@ es5id: 15.10.2.10_A1.4_T1 description: Use \f in RegExp and \u000C in tested string ---*/ -//CHECK#1 var arr = /\f/.exec("\u000C"); if ((arr === null) || (arr[0] !== "\u000C")) { throw new Test262Error('#1: var arr = /\\f/.exec("\\u000C"); arr[0] === "\\u000C". Actual. ' + (arr && arr[0])); } -//CHECK#2 var arr = /\f\f/.exec("a\u000C\u000Cb"); if ((arr === null) || (arr[0] !== "\u000C\u000C")) { throw new Test262Error('#2: var arr = /\\f\\f/.exec("a\\u000C\\u000Cb"); arr[0] === "\\u000C\\u000C". Actual. ' + (arr && arr[0])); diff --git a/test/built-ins/RegExp/S15.10.2.10_A1.5_T1.js b/test/built-ins/RegExp/S15.10.2.10_A1.5_T1.js index 62fe9bbe2a..f262e658d4 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A1.5_T1.js +++ b/test/built-ins/RegExp/S15.10.2.10_A1.5_T1.js @@ -9,13 +9,11 @@ es5id: 15.10.2.10_A1.5_T1 description: Use \r in RegExp and \u000D in tested string ---*/ -//CHECK#1 var arr = /\r/.exec("\u000D"); if ((arr === null) || (arr[0] !== "\u000D")) { throw new Test262Error('#1: var arr = /\\r/.exec("\\u000D"); arr[0] === "\\u000D". Actual. ' + (arr && arr[0])); } -//CHECK#2 var arr = /\r\r/.exec("a\u000D\u000Db"); if ((arr === null) || (arr[0] !== "\u000D\u000D")) { throw new Test262Error('#2: var arr = /\\r\\r/.exec("a\\u000D\\u000Db"); arr[0] === "\\u000D\\u000D". Actual. ' + (arr && arr[0])); diff --git a/test/built-ins/RegExp/S15.10.2.10_A2.1_T1.js b/test/built-ins/RegExp/S15.10.2.10_A2.1_T1.js index 6387f62ae9..1080046d24 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A2.1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.10_A2.1_T1.js @@ -7,8 +7,7 @@ es5id: 15.10.2.10_A2.1_T1 description: "ControlLetter :: A - Z" ---*/ -//CHECK#0041-005A -var result = true; +var result = true; for (var alpha = 0x0041; alpha <= 0x005A; alpha++) { var str = String.fromCharCode(alpha % 32); var arr = (new RegExp("\\c" + String.fromCharCode(alpha))).exec(str); @@ -17,6 +16,4 @@ for (var alpha = 0x0041; alpha <= 0x005A; alpha++) { } } -if (result !== true) { - throw new Test262Error('#1: CharacterEscape :: c A - Z'); -} +assert.sameValue(result, true, 'The value of result is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.10_A2.1_T2.js b/test/built-ins/RegExp/S15.10.2.10_A2.1_T2.js index 720ac8c18e..b3ddb788de 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A2.1_T2.js +++ b/test/built-ins/RegExp/S15.10.2.10_A2.1_T2.js @@ -7,8 +7,7 @@ es5id: 15.10.2.10_A2.1_T2 description: "ControlLetter :: a - z" ---*/ -//CHECK#0061-007A -var result = true; +var result = true; for (var alpha = 0x0061; alpha <= 0x007A; alpha++) { var str = String.fromCharCode(alpha % 32); var arr = (new RegExp("\\c" + String.fromCharCode(alpha))).exec(str); @@ -17,6 +16,4 @@ for (var alpha = 0x0061; alpha <= 0x007A; alpha++) { } } -if (result !== true) { - throw new Test262Error('#1: CharacterEscape :: c a - z'); -} +assert.sameValue(result, true, 'The value of result is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.10_A3.1_T1.js b/test/built-ins/RegExp/S15.10.2.10_A3.1_T1.js index 906ddd7333..f688f181dc 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A3.1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.10_A3.1_T1.js @@ -7,25 +7,21 @@ es5id: 15.10.2.10_A3.1_T1 description: Tested string include equal unicode symbols ---*/ -//CHECK#0 var arr = /\x00/.exec("\u0000"); if ((arr === null) || (arr[0] !== "\u0000")) { throw new Test262Error('#0: var arr = /\\x00/.exec(\\u0000); arr[0] === "\\u0000". Actual. ' + (arr && arr[0])); } -//CHECK#1 var arr = /\x01/.exec("\u0001"); if ((arr === null) || (arr[0] !== "\u0001")) { throw new Test262Error('#1: var arr = /\\x01/.exec(\\u0001); arr[0] === "\\u0001". Actual. ' + (arr && arr[0])); } -//CHECK#2 var arr = /\x0A/.exec("\u000A"); if ((arr === null) || (arr[0] !== "\u000A")) { throw new Test262Error('#2: var arr = /\\x0A/.exec(\\u000A); arr[0] === "\\u000A". Actual. ' + (arr && arr[0])); } -//CHECK#3 var arr = /\xFF/.exec("\u00FF"); if ((arr === null) || (arr[0] !== "\u00FF")) { throw new Test262Error('#3: var arr = /\\xFF/.exec(\\u00FF); arr[0] === "\\u00FF". Actual. ' + (arr && arr[0])); diff --git a/test/built-ins/RegExp/S15.10.2.10_A3.1_T2.js b/test/built-ins/RegExp/S15.10.2.10_A3.1_T2.js index 524415ab03..1ee65476bd 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A3.1_T2.js +++ b/test/built-ins/RegExp/S15.10.2.10_A3.1_T2.js @@ -7,7 +7,6 @@ es5id: 15.10.2.10_A3.1_T2 description: Checking ENGLISH CAPITAL ALPHABET and english small alphabet ---*/ -//CHECK#41-5A var hex = ["\\x41", "\\x42", "\\x43", "\\x44", "\\x45", "\\x46", "\\x47", "\\x48", "\\x49", "\\x4A", "\\x4B", "\\x4C", "\\x4D", "\\x4E", "\\x4F", "\\x50", "\\x51", "\\x52", "\\x53", "\\x54", "\\x55", "\\x56", "\\x57", "\\x58", "\\x59", "\\x5A"]; var character = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; var result = true; @@ -18,11 +17,8 @@ for (var index = 0; index < hex.length; index++) { } } -if (result !== true) { - throw new Test262Error('#1: ENGLISH CAPITAL ALPHABET'); -} +assert.sameValue(result, true, 'The value of result is expected to be true'); -//CHECK#61-7A hex = ["\\x61", "\\x62", "\\x63", "\\x64", "\\x65", "\\x66", "\\x67", "\\x68", "\\x69", "\\x6A", "\\x6B", "\\x6C", "\\x6D", "\\x6E", "\\x6F", "\\x70", "\\x71", "\\x72", "\\x73", "\\x74", "\\x75", "\\x76", "\\x77", "\\x78", "\\x79", "\\x7A"]; character = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; var result = true; @@ -33,6 +29,4 @@ for (index = 0; index < hex.length; index++) { } } -if (result !== true) { - throw new Test262Error('#1: english small alphabet'); -} +assert.sameValue(result, true, 'The value of result is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.10_A4.1_T1.js b/test/built-ins/RegExp/S15.10.2.10_A4.1_T1.js index f310f22f4f..2585ed82c6 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A4.1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.10_A4.1_T1.js @@ -9,37 +9,31 @@ es5id: 15.10.2.10_A4.1_T1 description: RegExp and tested string include uncode symbols ---*/ -//CHECK#0 var arr = /\u0000/.exec("\u0000"); if ((arr === null) || (arr[0] !== "\u0000")) { throw new Test262Error('#0: var arr = /\\u0000/.exec(\\u0000); arr[0] === "\\u0000". Actual. ' + (arr && arr[0])); } -//CHECK#1 var arr = /\u0001/.exec("\u0001"); if ((arr === null) || (arr[0] !== "\u0001")) { throw new Test262Error('#1: var arr = /\\u0001/.exec(\\u0001); arr[0] === "\\u0001". Actual. ' + (arr && arr[0])); } -//CHECK#2 var arr = /\u000A/.exec("\u000A"); if ((arr === null) || (arr[0] !== "\u000A")) { throw new Test262Error('#2: var arr = /\\u000A/.exec(\\u000A); arr[0] === "\\u000A". Actual. ' + (arr && arr[0])); } -//CHECK#3 var arr = /\u00FF/.exec("\u00FF"); if ((arr === null) || (arr[0] !== "\u00FF")) { throw new Test262Error('#3: var arr = /\\u00FF/.exec(\\u00FF); arr[0] === "\\u00FF". Actual. ' + (arr && arr[0])); } -//CHECK#4 var arr = /\u0FFF/.exec("\u0FFF"); if ((arr === null) || (arr[0] !== "\u0FFF")) { throw new Test262Error('#4: var arr = /\\u0FFF/.exec(\\u0FFF); arr[0] === "\\u0FFF". Actual. ' + (arr && arr[0])); } -//CHECK#5 var arr = /\uFFFF/.exec("\uFFFF"); if ((arr === null) || (arr[0] !== "\uFFFF")) { throw new Test262Error('#5: var arr = /\\uFFFF/.exec(\\uFFFF); arr[0] === "\\uFFFF". Actual. ' + (arr && arr[0])); diff --git a/test/built-ins/RegExp/S15.10.2.10_A4.1_T2.js b/test/built-ins/RegExp/S15.10.2.10_A4.1_T2.js index 156eafb0fe..8fc84a2d88 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A4.1_T2.js +++ b/test/built-ins/RegExp/S15.10.2.10_A4.1_T2.js @@ -11,7 +11,6 @@ description: > alphabet ---*/ -//CHECK#41-5A var hex = ["\\u0041", "\\u0042", "\\u0043", "\\u0044", "\\u0045", "\\u0046", "\\u0047", "\\u0048", "\\u0049", "\\u004A", "\\u004B", "\\u004C", "\\u004D", "\\u004E", "\\u004F", "\\u0050", "\\u0051", "\\u0052", "\\u0053", "\\u0054", "\\u0055", "\\u0056", "\\u0057", "\\u0058", "\\u0059", "\\u005A"]; var character = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; var result = true; @@ -22,11 +21,8 @@ for (var index = 0; index < hex.length; index++) { } } -if (result !== true) { - throw new Test262Error('#1: ENGLISH CAPITAL ALPHABET'); -} +assert.sameValue(result, true, 'The value of result is expected to be true'); -//CHECK#61-7A hex = ["\\u0061", "\\u0062", "\\u0063", "\\u0064", "\\u0065", "\\u0066", "\\u0067", "\\u0068", "\\u0069", "\\u006A", "\\u006B", "\\u006C", "\\u006D", "\\u006E", "\\u006F", "\\u0070", "\\u0071", "\\u0072", "\\u0073", "\\u0074", "\\u0075", "\\u0076", "\\u0077", "\\u0078", "\\u0079", "\\u007A"]; character = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; var result = true; @@ -37,6 +33,4 @@ for (index = 0; index < hex.length; index++) { } } -if (result !== true) { - throw new Test262Error('#1: english small alphabet'); -} +assert.sameValue(result, true, 'The value of result is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.10_A4.1_T3.js b/test/built-ins/RegExp/S15.10.2.10_A4.1_T3.js index efa6f82a8e..6d22d359c4 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A4.1_T3.js +++ b/test/built-ins/RegExp/S15.10.2.10_A4.1_T3.js @@ -11,7 +11,6 @@ description: > alphabet in unicode notation ---*/ -//CHECK#0410-042F, 0401 var hex = ["\\u0410", "\\u0411", "\\u0412", "\\u0413", "\\u0414", "\\u0415", "\\u0416", "\\u0417", "\\u0418", "\\u0419", "\\u041A", "\\u041B", "\\u041C", "\\u041D", "\\u041E", "\\u041F", "\\u0420", "\\u0421", "\\u0422", "\\u0423", "\\u0424", "\\u0425", "\\u0426", "\\u0427", "\\u0428", "\\u0429", "\\u042A", "\\u042B", "\\u042C", "\\u042D", "\\u042E", "\\u042F", "\\u0401"]; var character = ["\u0410", "\u0411", "\u0412", "\u0413", "\u0414", "\u0415", "\u0416", "\u0417", "\u0418", "\u0419", "\u041A", "\u041B", "\u041C", "\u041D", "\u041E", "\u041F", "\u0420", "\u0421", "\u0422", "\u0423", "\u0424", "\u0425", "\u0426", "\u0427", "\u0428", "\u0429", "\u042A", "\u042B", "\u042C", "\u042D", "\u042E", "\u042F", "\u0401"]; var result = true; @@ -22,11 +21,8 @@ for (var index = 0; index < hex.length; index++) { } } -if (result !== true) { - throw new Test262Error('#1: RUSSIAN CAPITAL ALPHABET'); -} +assert.sameValue(result, true, 'The value of result is expected to be true'); -//CHECK#0430-044F, 0451 hex = ["\\u0430", "\\u0431", "\\u0432", "\\u0433", "\\u0434", "\\u0435", "\\u0436", "\\u0437", "\\u0438", "\\u0439", "\\u043A", "\\u043B", "\\u043C", "\\u043D", "\\u043E", "\\u043F", "\\u0440", "\\u0441", "\\u0442", "\\u0443", "\\u0444", "\\u0445", "\\u0446", "\\u0447", "\\u0448", "\\u0449", "\\u044A", "\\u044B", "\\u044C", "\\u044D", "\\u044E", "\\u044F", "\\u0451"]; character = ["\u0430", "\u0431", "\u0432", "\u0433", "\u0434", "\u0435", "\u0436", "\u0437", "\u0438", "\u0439", "\u043A", "\u043B", "\u043C", "\u043D", "\u043E", "\u043F", "\u0440", "\u0441", "\u0442", "\u0443", "\u0444", "\u0445", "\u0446", "\u0447", "\u0448", "\u0449", "\u044A", "\u044B", "\u044C", "\u044D", "\u044E", "\u044F", "\u0451"]; var result = true; @@ -37,6 +33,4 @@ for (index = 0; index < hex.length; index++) { } } -if (result !== true) { - throw new Test262Error('#1: russian small alphabet'); -} +assert.sameValue(result, true, 'The value of result is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.10_A5.1_T1.js b/test/built-ins/RegExp/S15.10.2.10_A5.1_T1.js index f51b878346..3c224c43e2 100644 --- a/test/built-ins/RegExp/S15.10.2.10_A5.1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.10_A5.1_T1.js @@ -9,7 +9,6 @@ es5id: 15.10.2.10_A5.1_T1 description: "Tested string is \"~`!@#$%^&*()-+={[}]|\\\\:;'<,>./?\" + '\"'" ---*/ -//CHECK#1 var non_ident = "~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"'; for (var k = 0; k < non_ident.length; ++k) { var arr = new RegExp("\\" + non_ident[k], "g").exec(non_ident); diff --git a/test/built-ins/RegExp/S15.10.2.11_A1_T1.js b/test/built-ins/RegExp/S15.10.2.11_A1_T1.js index 776365800a..03d3d517c2 100644 --- a/test/built-ins/RegExp/S15.10.2.11_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.11_A1_T1.js @@ -9,13 +9,11 @@ description: > consisting of a character (Unicodevalue0000) ---*/ -//CHECK#1 var arr = /\0/.exec("\u0000"); if ((arr === null) || (arr[0] !== "\u0000")) { throw new Test262Error('#1: var arr = /\\0/.exec(\\u0000); arr[0] === "\\u0000". Actual. ' + (arr && arr[0])); } -//CHECK#2 var arr = (new RegExp("\\0")).exec("\u0000"); if ((arr === null) || (arr[0] !== "\u0000")) { throw new Test262Error('#2: var arr = (new RegExp("\\0")).exec(\\u0000); arr[0] === "\\u0000". Actual. ' + (arr && arr[0])); diff --git a/test/built-ins/RegExp/S15.10.2.11_A1_T4.js b/test/built-ins/RegExp/S15.10.2.11_A1_T4.js index 48ff318e52..a5a4cd94b2 100644 --- a/test/built-ins/RegExp/S15.10.2.11_A1_T4.js +++ b/test/built-ins/RegExp/S15.10.2.11_A1_T4.js @@ -9,12 +9,10 @@ description: DecimalIntegerLiteral is not 0 var arr = /(A)\1/.exec("AA"); -//CHECK#1 if ((arr === null) || (arr[0] !== "AA")) { throw new Test262Error('#1: var arr = (/(A)\\1/.exec("AA")); arr[0] === "AA". Actual. ' + (arr && arr[0])); } -//CHECK#2 if ((arr === null) || (arr[1] !== "A")) { throw new Test262Error('#2: var arr = (/(A)\\1/.exec("AA")); arr[1] === "A". Actual. ' + (arr && arr[1])); } diff --git a/test/built-ins/RegExp/S15.10.2.11_A1_T5.js b/test/built-ins/RegExp/S15.10.2.11_A1_T5.js index 9cbdba5167..e1080bb2e3 100644 --- a/test/built-ins/RegExp/S15.10.2.11_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.2.11_A1_T5.js @@ -9,12 +9,10 @@ description: DecimalIntegerLiteral is not 0 var arr = /\1(A)/.exec("AA"); -//CHECK#1 if ((arr === null) || (arr[0] !== "A")) { throw new Test262Error('#1: var arr = (/\\1(A)/.exec("AA")); arr[0] === "A". Actual. ' + (arr && arr[0])); } -//CHECK#2 if ((arr === null) || (arr[1] !== "A")) { throw new Test262Error('#2: var arr = (/\\1(A)/.exec("AA")); arr[1] === "A". Actual. ' + (arr && arr[1])); } diff --git a/test/built-ins/RegExp/S15.10.2.11_A1_T6.js b/test/built-ins/RegExp/S15.10.2.11_A1_T6.js index c936784aae..a5da4c4e12 100644 --- a/test/built-ins/RegExp/S15.10.2.11_A1_T6.js +++ b/test/built-ins/RegExp/S15.10.2.11_A1_T6.js @@ -9,17 +9,14 @@ description: DecimalIntegerLiteral is not 0 var arr = /(A)\1(B)\2/.exec("AABB"); -//CHECK#1 if ((arr === null) || (arr[0] !== "AABB")) { throw new Test262Error('#1: var arr = /(A)\\1(B)\\2/.exec("AABB"); arr[0] === "AABB". Actual. ' + (arr && arr[0])); } -//CHECK#2 if ((arr === null) || (arr[1] !== "A")) { throw new Test262Error('#2: var arr = /(A)\\1(B)\\2/.exec("AABB"); arr[1] === "A". Actual. ' + (arr && arr[1])); } -//CHECK#3 if ((arr === null) || (arr[2] !== "B")) { throw new Test262Error('#3: var arr = /(A)\\1(B)\\2/.exec("AABB"); arr[2] === "B". Actual. ' + (arr && arr[2])); } diff --git a/test/built-ins/RegExp/S15.10.2.11_A1_T7.js b/test/built-ins/RegExp/S15.10.2.11_A1_T7.js index 7691d0232c..53f8313221 100644 --- a/test/built-ins/RegExp/S15.10.2.11_A1_T7.js +++ b/test/built-ins/RegExp/S15.10.2.11_A1_T7.js @@ -9,17 +9,14 @@ description: DecimalIntegerLiteral is not 0 var arr = /\1(A)(B)\2/.exec("ABB"); -//CHECK#1 if ((arr === null) || (arr[0] !== "ABB")) { throw new Test262Error('#1: var arr = /\\1(A)(B)\\2/.exec("ABB"); arr[0] === "ABB". Actual. ' + (arr && arr[0])); } -//CHECK#2 if ((arr === null) || (arr[1] !== "A")) { throw new Test262Error('#2: var arr = /\\1(A)(B)\\2/.exec("ABB"); arr[1] === "A". Actual. ' + (arr && arr[1])); } -//CHECK#3 if ((arr === null) || (arr[2] !== "B")) { throw new Test262Error('#3: var arr = /\\1(A)(B)\\2/.exec("ABB"); arr[2] === "B". Actual. ' + (arr && arr[2])); } diff --git a/test/built-ins/RegExp/S15.10.2.11_A1_T8.js b/test/built-ins/RegExp/S15.10.2.11_A1_T8.js index 7f99064dc7..51dbe6f5c6 100644 --- a/test/built-ins/RegExp/S15.10.2.11_A1_T8.js +++ b/test/built-ins/RegExp/S15.10.2.11_A1_T8.js @@ -9,14 +9,12 @@ description: DecimalIntegerLiteral is not 0 var arr = /((((((((((A))))))))))\1\2\3\4\5\6\7\8\9\10/.exec("AAAAAAAAAAA"); -//CHECK#1 if ((arr === null) || (arr[0] !== "AAAAAAAAAAA")) { throw new Test262Error('#1: var arr = /((((((((((A))))))))))\\1\\2\\3\\4\\5\\6\\7\\8\\9\\10/.exec("AAAAAAAAAAA"); arr[0] === "AAAAAAAAAAA". Actual. ' + (arr && arr[0])); } for (var i = 1; i <= 10; i++) { - //CHECK#i - if ((arr === null) || (arr[i] !== "A")) { + if ((arr === null) || (arr[i] !== "A")) { throw new Test262Error('#2: var arr = /((((((((((A))))))))))\\1\\2\\3\\4\\5\\6\\7\\8\\9\\10/.exec("AAAAAAAAAAA"); arr[' + i + '] === "A". Actual. ' + (arr && arr[i])); } } diff --git a/test/built-ins/RegExp/S15.10.2.11_A1_T9.js b/test/built-ins/RegExp/S15.10.2.11_A1_T9.js index 3860bf11cf..036ea872ea 100644 --- a/test/built-ins/RegExp/S15.10.2.11_A1_T9.js +++ b/test/built-ins/RegExp/S15.10.2.11_A1_T9.js @@ -9,14 +9,12 @@ description: DecimalIntegerLiteral is not 0 var arr = /((((((((((A))))))))))\10\9\8\7\6\5\4\3\2\1/.exec("AAAAAAAAAAA"); -//CHECK#1 if ((arr === null) || (arr[0] !== "AAAAAAAAAAA")) { throw new Test262Error('#1: var arr = /((((((((((A))))))))))\\10\\9\\8\\7\\6\\5\\4\\3\\2\\1/.exec("AAAAAAAAAAA"); arr[0] === "AAAAAAAAAAA". Actual. ' + (arr && arr[0])); } for (var i = 1; i <= 10; i++) { - //CHECK#i - if ((arr === null) || (arr[i] !== "A")) { + if ((arr === null) || (arr[i] !== "A")) { throw new Test262Error('#2: var arr = /((((((((((A))))))))))\\10\\9\\8\\7\\6\\5\\4\\3\\2\\1/.exec("AAAAAAAAAAA"); arr[' + i + '] === "A". Actual. ' + (arr && arr[i])); } } diff --git a/test/built-ins/RegExp/S15.10.2.12_A3_T5.js b/test/built-ins/RegExp/S15.10.2.12_A3_T5.js index 3c15b8daf6..0a567d3910 100644 --- a/test/built-ins/RegExp/S15.10.2.12_A3_T5.js +++ b/test/built-ins/RegExp/S15.10.2.12_A3_T5.js @@ -9,13 +9,14 @@ es5id: 15.10.2.12_A3_T5 description: non-w ---*/ -//CHECK#1 var non_w = "\f\n\r\t\v~`!@#$%^&*()-+={[}]|\\:;'<,>./? " + '"'; -if (/\w/.exec(non_w) !== null) { - throw new Test262Error('#1: non-w'); -} -//CHECK#2 +assert.sameValue( + /\w/.exec(non_w), + null, + '/w/.exec(""fnrtv~`!@#$%^&*()-+={[}]|:;\'<,>./? " + \'"\'") must return null' +); + var non_W = "_0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; var regexp_w = /\w/g; var k = 0; @@ -23,6 +24,4 @@ while (regexp_w.exec(non_W) !== null) { k++; } -if (non_W.length !== k) { - throw new Test262Error('#2: non-W'); -} +assert.sameValue(non_W.length, k, 'The value of non_W.length is expected to equal the value of k'); diff --git a/test/built-ins/RegExp/S15.10.2.12_A4_T5.js b/test/built-ins/RegExp/S15.10.2.12_A4_T5.js index 873a96b7a8..a5de48e50d 100644 --- a/test/built-ins/RegExp/S15.10.2.12_A4_T5.js +++ b/test/built-ins/RegExp/S15.10.2.12_A4_T5.js @@ -9,7 +9,6 @@ es5id: 15.10.2.12_A4_T5 description: non-w ---*/ -//CHECK#1 var non_w = "\f\n\r\t\v~`!@#$%^&*()-+={[}]|\\:;'<,>./? " + '"'; var regexp_W = /\W/g; var k = 0; @@ -17,12 +16,12 @@ while (regexp_W.exec(non_w) !== null) { k++; } -if (non_w.length !== k) { - throw new Test262Error('#1: non-w'); -} +assert.sameValue(non_w.length, k, 'The value of non_w.length is expected to equal the value of k'); -//CHECK#2 var non_W = "_0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; -if (/\W/.exec(non_W) !== null) { - throw new Test262Error('#2: non-W'); -} + +assert.sameValue( + /\W/.exec(non_W), + null, + '/W/.exec(""_0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"") must return null' +); diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T1.js b/test/built-ins/RegExp/S15.10.2.13_A1_T1.js index ac06addade..35428fbc7e 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T1.js @@ -10,9 +10,5 @@ es5id: 15.10.2.13_A1_T1 description: Execute /[]a/.test("\0a\0a") and check results ---*/ -var __executed = /[]a/.test("\0a\0a");; - -//CHECK#1 - if (__executed) { - throw new Test262Error('#1: /[]a/.test("\\0a\\0a") === false'); -} +var __executed = /[]a/.test("\0a\0a"); +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T10.js b/test/built-ins/RegExp/S15.10.2.13_A1_T10.js index a64c228532..050a4fe420 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T10.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T10.js @@ -16,24 +16,28 @@ var __expected = ["abc324234"]; __expected.index = 2; __expected.input = "\n\n\abc324234\n"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[a-c\\d]+/.exec("\\n\\n\\abc324234\\n"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[a-c\\d]+/.exec("\\n\\n\\abc324234\\n"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[a-c\\d]+/.exec("\\n\\n\\abc324234\\n"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[a-c\\d]+/.exec("\\n\\n\\abc324234\\n"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T11.js b/test/built-ins/RegExp/S15.10.2.13_A1_T11.js index 7309e495b0..43e7e43197 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T11.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T11.js @@ -16,24 +16,28 @@ var __expected = ["abc"]; __expected.index = 0; __expected.input = "abc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /ab[.]?c/.exec("abc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /ab[.]?c/.exec("abc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /ab[.]?c/.exec("abc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /ab[.]?c/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T12.js b/test/built-ins/RegExp/S15.10.2.13_A1_T12.js index 002104e313..62f48c7056 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T12.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T12.js @@ -16,24 +16,28 @@ var __expected = ["abc"]; __expected.index = 0; __expected.input = "abc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a[b]c/.exec("abc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a[b]c/.exec("abc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a[b]c/.exec("abc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a[b]c/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T13.js b/test/built-ins/RegExp/S15.10.2.13_A1_T13.js index ebfc4c975e..b143245a07 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T13.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T13.js @@ -18,24 +18,28 @@ var __expected = ["def"]; __expected.index = 15; __expected.input = "a1b b2c c3d def f4g"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[a-z][^1-9][a-z]/.exec("a1b b2c c3d def f4g"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[a-z][^1-9][a-z]/.exec("a1b b2c c3d def f4g"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[a-z][^1-9][a-z]/.exec("a1b b2c c3d def f4g"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[a-z][^1-9][a-z]/.exec("a1b b2c c3d def f4g"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T14.js b/test/built-ins/RegExp/S15.10.2.13_A1_T14.js index deb0472442..28352cfe08 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T14.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T14.js @@ -16,24 +16,28 @@ var __expected = ["*&$"]; __expected.index = 3; __expected.input = "123*&$abc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[*&$]{3}/.exec("123*&$abc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[*&$]{3}/.exec("123*&$abc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[*&$]{3}/.exec("123*&$abc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[*&$]{3}/.exec("123*&$abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T15.js b/test/built-ins/RegExp/S15.10.2.13_A1_T15.js index 4763e85559..dbd7fb5849 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T15.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T15.js @@ -16,24 +16,28 @@ var __expected = ["1\nl"]; __expected.index = 4; __expected.input = "line1\nline2"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[\\d][\\n][^\\d]/.exec("line1\\nline2"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[\\d][\\n][^\\d]/.exec("line1\\nline2"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[\\d][\\n][^\\d]/.exec("line1\\nline2"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[\\d][\\n][^\\d]/.exec("line1\\nline2"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T17.js b/test/built-ins/RegExp/S15.10.2.13_A1_T17.js index 0bedac8111..484d7f6ce9 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T17.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T17.js @@ -12,7 +12,4 @@ description: Execute /[]/.exec("a[b\n[]\tc]d") and check results var __executed = /[]/.exec("a[b\n[]\tc]d"); -//CHECK#1 -if (__executed !== null) { - throw new Test262Error('#1: /[]/.exec("a[b\\n[]\\tc]d") === false'); -} +assert.sameValue(__executed, null, 'The value of __executed is expected to be null'); diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T2.js b/test/built-ins/RegExp/S15.10.2.13_A1_T2.js index e90b7b43ed..1fcea14ce9 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T2.js @@ -10,9 +10,5 @@ es5id: 15.10.2.13_A1_T2 description: Execute /a[]/.test("\0a\0a") and check results ---*/ -var __executed = /a[]/.test("\0a\0a");; - -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /a[]/.test("\\0a\\0a") === false'); -} +var __executed = /a[]/.test("\0a\0a"); +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T3.js b/test/built-ins/RegExp/S15.10.2.13_A1_T3.js index 946921253b..8b707369ba 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T3.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T3.js @@ -16,24 +16,28 @@ var __expected = ["qy"]; __expected.index = 2; __expected.input = "qYqy "; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /q[ax-zb](?=\\s+)/.exec("qYqy "); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /q[ax-zb](?=\\s+)/.exec("qYqy "); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /q[ax-zb](?=\\s+)/.exec("qYqy "); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /q[ax-zb](?=\\s+)/.exec("qYqy "); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T4.js b/test/built-ins/RegExp/S15.10.2.13_A1_T4.js index 8b2e3db2df..c0a624f4a7 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T4.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T4.js @@ -16,24 +16,28 @@ var __expected = ["qy"]; __expected.index = 3; __expected.input = "tqaqy "; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /q[ax-zb](?=\\s+)/.exec("tqaqy "); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /q[ax-zb](?=\\s+)/.exec("tqaqy "); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /q[ax-zb](?=\\s+)/.exec("tqaqy "); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /q[ax-zb](?=\\s+)/.exec("tqaqy "); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T5.js b/test/built-ins/RegExp/S15.10.2.13_A1_T5.js index 87a8c8a386..5d908cca45 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T5.js @@ -16,24 +16,28 @@ var __expected = ["qa"]; __expected.index = 1; __expected.input = "tqa\t qy "; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /q[ax-zb](?=\\s+)/.exec("tqa\\t qy "); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /q[ax-zb](?=\\s+)/.exec("tqa\\t qy "); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /q[ax-zb](?=\\s+)/.exec("tqa\\t qy "); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /q[ax-zb](?=\\s+)/.exec("tqa\\t qy "); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T6.js b/test/built-ins/RegExp/S15.10.2.13_A1_T6.js index 5654657ea4..8c2a6750b7 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T6.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T6.js @@ -16,24 +16,28 @@ var __expected = ["abcde"]; __expected.index = 0; __expected.input = "abcde"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /ab[ercst]de/.exec("abcde"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /ab[ercst]de/.exec("abcde"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /ab[ercst]de/.exec("abcde"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /ab[ercst]de/.exec("abcde"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T7.js b/test/built-ins/RegExp/S15.10.2.13_A1_T7.js index a371351e0d..09563764ec 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T7.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T7.js @@ -12,7 +12,4 @@ description: Execute /ab[erst]de/.test("abcde") and check results var __executed = /ab[erst]de/.test("abcde"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /ab[erst]de/.test("abcde") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T8.js b/test/built-ins/RegExp/S15.10.2.13_A1_T8.js index 863e630036..b1bbb668b7 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T8.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T8.js @@ -16,24 +16,28 @@ var __expected = ["defgh"]; __expected.index = 3; __expected.input = "abcdefghijkl"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[d-h]+/.exec("abcdefghijkl"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[d-h]+/.exec("abcdefghijkl"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[d-h]+/.exec("abcdefghijkl"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[d-h]+/.exec("abcdefghijkl"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A1_T9.js b/test/built-ins/RegExp/S15.10.2.13_A1_T9.js index a01e6ec408..0ac65487c4 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A1_T9.js +++ b/test/built-ins/RegExp/S15.10.2.13_A1_T9.js @@ -16,24 +16,28 @@ var __expected = ["6de"]; __expected.index = 3; __expected.input = "abc6defghijkl"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[1234567].{2}/.exec("abc6defghijkl"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[1234567].{2}/.exec("abc6defghijkl"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[1234567].{2}/.exec("abc6defghijkl"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[1234567].{2}/.exec("abc6defghijkl"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A2_T1.js b/test/built-ins/RegExp/S15.10.2.13_A2_T1.js index b3e3be6dc4..6609a5f572 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A2_T1.js +++ b/test/built-ins/RegExp/S15.10.2.13_A2_T1.js @@ -16,24 +16,28 @@ var __expected = ["\na"]; __expected.index = 1; __expected.input = "a\naba"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^]a/m.exec("a\\naba"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^]a/m.exec("a\\naba"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^]a/m.exec("a\\naba"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^]a/m.exec("a\\naba"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A2_T2.js b/test/built-ins/RegExp/S15.10.2.13_A2_T2.js index 27ccca4435..efe75662d7 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A2_T2.js +++ b/test/built-ins/RegExp/S15.10.2.13_A2_T2.js @@ -16,24 +16,28 @@ var __expected = ["a\t"]; __expected.index = 3; __expected.input = " a\t\n"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a[^]/.exec(" a\\t\\n"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a[^]/.exec(" a\\t\\n"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a[^]/.exec(" a\\t\\n"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a[^]/.exec(" a\\t\\n"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A2_T3.js b/test/built-ins/RegExp/S15.10.2.13_A2_T3.js index 5ef30235b8..4c0bca3ab3 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A2_T3.js +++ b/test/built-ins/RegExp/S15.10.2.13_A2_T3.js @@ -16,24 +16,28 @@ var __expected = ["aY "]; __expected.index = 9; __expected.input = "ab an az aY n"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a[^b-z]\\s+/.exec("ab an az aY n"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a[^b-z]\\s+/.exec("ab an az aY n"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a[^b-z]\\s+/.exec("ab an az aY n"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a[^b-z]\\s+/.exec("ab an az aY n"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A2_T4.js b/test/built-ins/RegExp/S15.10.2.13_A2_T4.js index d3132a07c3..06eb91b6b2 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A2_T4.js +++ b/test/built-ins/RegExp/S15.10.2.13_A2_T4.js @@ -16,24 +16,28 @@ var __expected = ["easy"]; __expected.index = 0; __expected.input = "easy\bto\u0008ride"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^\\b]+/g.exec("easy\\bto\\u0008ride"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^\\b]+/g.exec("easy\\bto\\u0008ride"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^\\b]+/g.exec("easy\\bto\\u0008ride"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^\\b]+/g.exec("easy\\bto\\u0008ride"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A2_T5.js b/test/built-ins/RegExp/S15.10.2.13_A2_T5.js index 0f0c44c80f..4b6371c256 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A2_T5.js +++ b/test/built-ins/RegExp/S15.10.2.13_A2_T5.js @@ -16,24 +16,28 @@ var __expected = ["abc"]; __expected.index = 0; __expected.input = "abc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a[^1-9]c/.exec("abc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a[^1-9]c/.exec("abc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a[^1-9]c/.exec("abc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a[^1-9]c/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A2_T6.js b/test/built-ins/RegExp/S15.10.2.13_A2_T6.js index 0a51307f7f..8690dc764c 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A2_T6.js +++ b/test/built-ins/RegExp/S15.10.2.13_A2_T6.js @@ -12,7 +12,4 @@ description: Execute /a[^b]c/.test("abc") and check results var __executed = /a[^b]c/.test("abc"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /a[^b]c/.test("abc") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.13_A2_T7.js b/test/built-ins/RegExp/S15.10.2.13_A2_T7.js index dafab50497..46cd51e4e5 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A2_T7.js +++ b/test/built-ins/RegExp/S15.10.2.13_A2_T7.js @@ -16,24 +16,28 @@ var __expected = ["%&*@"]; __expected.index = 9; __expected.input = "abc#$%def%&*@ghi"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^a-z]{4}/.exec("abc#$%def%&*@ghi"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^a-z]{4}/.exec("abc#$%def%&*@ghi"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^a-z]{4}/.exec("abc#$%def%&*@ghi"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^a-z]{4}/.exec("abc#$%def%&*@ghi"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A2_T8.js b/test/built-ins/RegExp/S15.10.2.13_A2_T8.js index 2a7e64c26f..4cc39bfbdd 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A2_T8.js +++ b/test/built-ins/RegExp/S15.10.2.13_A2_T8.js @@ -16,24 +16,28 @@ var __expected = ["a"]; __expected.index = 0; __expected.input = "abc#$%def%&*@ghi"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^]/.exec("abc#$%def%&*@ghi"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^]/.exec("abc#$%def%&*@ghi"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^]/.exec("abc#$%def%&*@ghi"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^]/.exec("abc#$%def%&*@ghi"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A3_T1.js b/test/built-ins/RegExp/S15.10.2.13_A3_T1.js index d5425ff1a2..8659c4a657 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A3_T1.js +++ b/test/built-ins/RegExp/S15.10.2.13_A3_T1.js @@ -13,24 +13,28 @@ var __expected = ["c\bd"]; __expected.index = 2; __expected.input = "abc\bdef"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /.[\\b]./.exec("abc\\bdef"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /.[\\b]./.exec("abc\\bdef"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /.[\\b]./.exec("abc\\bdef"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /.[\\b]./.exec("abc\\bdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A3_T2.js b/test/built-ins/RegExp/S15.10.2.13_A3_T2.js index b3ea3c1ab6..3f0dc92f4c 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A3_T2.js +++ b/test/built-ins/RegExp/S15.10.2.13_A3_T2.js @@ -13,24 +13,28 @@ var __expected = ["c\b\b\bd"]; __expected.index = 2; __expected.input = "abc\b\b\bdef"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /c[\\b]{3}d/.exec("abc\\b\\b\\bdef"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /c[\\b]{3}d/.exec("abc\\b\\b\\bdef"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /c[\\b]{3}d/.exec("abc\\b\\b\\bdef"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /c[\\b]{3}d/.exec("abc\\b\\b\\bdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A3_T3.js b/test/built-ins/RegExp/S15.10.2.13_A3_T3.js index 9dd0ad0d0a..dabe535e93 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A3_T3.js +++ b/test/built-ins/RegExp/S15.10.2.13_A3_T3.js @@ -13,24 +13,28 @@ var __expected = ["abc"]; __expected.index = 0; __expected.input = "abc\bdef"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^\\[\\b\\]]+/.exec("abc\\bdef"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^\\[\\b\\]]+/.exec("abc\\bdef"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^\\[\\b\\]]+/.exec("abc\\bdef"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^\\[\\b\\]]+/.exec("abc\\bdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.13_A3_T4.js b/test/built-ins/RegExp/S15.10.2.13_A3_T4.js index c1ca56e350..b516150971 100644 --- a/test/built-ins/RegExp/S15.10.2.13_A3_T4.js +++ b/test/built-ins/RegExp/S15.10.2.13_A3_T4.js @@ -13,24 +13,28 @@ var __expected = ["abcdef"]; __expected.index = 0; __expected.input = "abcdef"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^\\[\\b\\]]+/.exec("abcdef"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^\\[\\b\\]]+/.exec("abcdef"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^\\[\\b\\]]+/.exec("abcdef"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^\\[\\b\\]]+/.exec("abcdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T1.js b/test/built-ins/RegExp/S15.10.2.15_A1_T1.js index 0f408e6134..0954d90870 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T1.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[b-ac-e]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[b-ac-e]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[b-ac-e]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T10.js b/test/built-ins/RegExp/S15.10.2.15_A1_T10.js index 108bf0a514..7f1596da23 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T10.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T10.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\10b-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\10b-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\10b-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T11.js b/test/built-ins/RegExp/S15.10.2.15_A1_T11.js index dcdd702b77..24073339fd 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T11.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T11.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\bd-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\bd-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\bd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T12.js b/test/built-ins/RegExp/S15.10.2.15_A1_T12.js index 8a0fcedfa6..11a43d706c 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T12.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T12.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\Bd-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\Bd-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\Bd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T13.js b/test/built-ins/RegExp/S15.10.2.15_A1_T13.js index b4e15af2a0..0f4c1f51b9 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T13.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T13.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\td-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\td-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\td-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T14.js b/test/built-ins/RegExp/S15.10.2.15_A1_T14.js index ff000c2269..9ec87dd700 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T14.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T14.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\nd-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\nd-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\nd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T15.js b/test/built-ins/RegExp/S15.10.2.15_A1_T15.js index 52238e34f5..80aace2ac9 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T15.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T15.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\vd-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\vd-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\vd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T16.js b/test/built-ins/RegExp/S15.10.2.15_A1_T16.js index 2581c4edc1..ac705b4c81 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T16.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T16.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\fd-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\fd-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\fd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T17.js b/test/built-ins/RegExp/S15.10.2.15_A1_T17.js index 467943acba..ac1a79b0cc 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T17.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T17.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\rd-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\rd-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\rd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T18.js b/test/built-ins/RegExp/S15.10.2.15_A1_T18.js index ae2e9059fc..ec18e35798 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T18.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T18.js @@ -16,11 +16,14 @@ description: > throwing the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\c0001d-G]/.exec("1") throw SyntaxError. Actual: ' + (new RegExp("[\\c0001d-G]").exec("1"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\c0001d-G]/.exec("1") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T19.js b/test/built-ins/RegExp/S15.10.2.15_A1_T19.js index 2092ce0116..0aa363bdc4 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T19.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T19.js @@ -16,11 +16,14 @@ description: > throwing the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\x0061d-G]/.exec("1") throw SyntaxError. Actual: ' + (new RegExp("[\\x0061d-G]").exec("1"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\x0061d-G]/.exec("1") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T2.js b/test/built-ins/RegExp/S15.10.2.15_A1_T2.js index 4dc1b80406..abf988680b 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T2.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[a-dc-b]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[a-dc-b]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[a-dc-b]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T20.js b/test/built-ins/RegExp/S15.10.2.15_A1_T20.js index 24a2ccb1bf..dff458de58 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T20.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T20.js @@ -16,11 +16,14 @@ description: > throwing the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\u0061d-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\u0061d-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\u0061d-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T21.js b/test/built-ins/RegExp/S15.10.2.15_A1_T21.js index eeb08b581e..f349576e09 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T21.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T21.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\ad-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\ad-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\ad-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T22.js b/test/built-ins/RegExp/S15.10.2.15_A1_T22.js index ed7dcec991..fc7aa31b6b 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T22.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T22.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[c-eb-a]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[c-eb-a]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[c-eb-a]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T23.js b/test/built-ins/RegExp/S15.10.2.15_A1_T23.js index 20c1b33541..125724a6d0 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T23.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T23.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[b-G\\d]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[b-G\\d]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[b-G\\d]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T24.js b/test/built-ins/RegExp/S15.10.2.15_A1_T24.js index 281fffa72f..1edb3852db 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T24.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T24.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[b-G\\D]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[b-G\\D]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[b-G\\D]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T25.js b/test/built-ins/RegExp/S15.10.2.15_A1_T25.js index c84e0aec5f..d59d0280f7 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T25.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T25.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[b-G\\s]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[b-G\\s]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[b-G\\s]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T26.js b/test/built-ins/RegExp/S15.10.2.15_A1_T26.js index ca5fca68b1..c2c0bacb1a 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T26.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T26.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[b-G\\S]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[b-G\\S]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[b-G\\S]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T27.js b/test/built-ins/RegExp/S15.10.2.15_A1_T27.js index 2b44ab4d09..d9db505d8f 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T27.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T27.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[b-G\\w]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[b-G\\w]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[b-G\\w]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T28.js b/test/built-ins/RegExp/S15.10.2.15_A1_T28.js index 2b1eb12413..61e07fc9b5 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T28.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T28.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[b-G\\W]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[b-G\\W]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[b-G\\W]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T29.js b/test/built-ins/RegExp/S15.10.2.15_A1_T29.js index 107112b964..7754840f7d 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T29.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T29.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[b-G\\0]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[b-G\\0]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[b-G\\0]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T3.js b/test/built-ins/RegExp/S15.10.2.15_A1_T3.js index 157c381ab7..aa8480a46e 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T3.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T3.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\db-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\db-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\db-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T30.js b/test/built-ins/RegExp/S15.10.2.15_A1_T30.js index 950190c1a0..8d82d40d9c 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T30.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T30.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[b-G\\10]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[b-G\\10]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[b-G\\10]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T31.js b/test/built-ins/RegExp/S15.10.2.15_A1_T31.js index e0d9d509a7..e0dfa82066 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T31.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T31.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[d-G\\b]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[d-G\\b]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[d-G\\b]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T32.js b/test/built-ins/RegExp/S15.10.2.15_A1_T32.js index 17014c50d3..3cc36c2f91 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T32.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T32.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[d-G\\B]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[d-G\\B]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[d-G\\B]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T33.js b/test/built-ins/RegExp/S15.10.2.15_A1_T33.js index 27fa1e2545..4fb9e4ddb7 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T33.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T33.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[d-G\\t]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[d-G\\t]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[d-G\\t]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T34.js b/test/built-ins/RegExp/S15.10.2.15_A1_T34.js index bb178a075e..f26f617a87 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T34.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T34.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[d-G\\n]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[d-G\\n]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[d-G\\n]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T35.js b/test/built-ins/RegExp/S15.10.2.15_A1_T35.js index fd5e0b8e7a..3cba1f0b61 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T35.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T35.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[d-G\\v]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[d-G\\v]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[d-G\\v]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T36.js b/test/built-ins/RegExp/S15.10.2.15_A1_T36.js index 2bab335698..7cc48e928e 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T36.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T36.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[d-G\\f]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[d-G\\f]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[d-G\\f]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T37.js b/test/built-ins/RegExp/S15.10.2.15_A1_T37.js index 783aca232b..3707a99292 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T37.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T37.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[d-G\\r]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[d-G\\r]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[d-G\\r]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T38.js b/test/built-ins/RegExp/S15.10.2.15_A1_T38.js index 5b184d0015..bb3d5f8fb9 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T38.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T38.js @@ -16,11 +16,14 @@ description: > throwing the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[d-G\\c0001]/.exec("1") throw SyntaxError. Actual: ' + (new RegExp("[d-G\\c0001]").exec("1"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[d-G\\c0001]/.exec("1") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T39.js b/test/built-ins/RegExp/S15.10.2.15_A1_T39.js index ccd4858b27..d9c5ad3073 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T39.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T39.js @@ -16,11 +16,14 @@ description: > throwing the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[d-G\\x0061]/.exec("1") throw SyntaxError. Actual: ' + (new RegExp("[d-G\\x0061]").exec("1"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[d-G\\x0061]/.exec("1") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T4.js b/test/built-ins/RegExp/S15.10.2.15_A1_T4.js index 22d3ce2cef..8325a04d56 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T4.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T4.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\Db-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\Db-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\Db-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T40.js b/test/built-ins/RegExp/S15.10.2.15_A1_T40.js index feb2a0302c..b4ec442b59 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T40.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T40.js @@ -16,11 +16,14 @@ description: > throwing the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[d-G\\u0061]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[d-G\\u0061]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[d-G\\u0061]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T41.js b/test/built-ins/RegExp/S15.10.2.15_A1_T41.js index f591447c34..e6e070054d 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T41.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T41.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[d-G\\a]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[d-G\\a]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[d-G\\a]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T5.js b/test/built-ins/RegExp/S15.10.2.15_A1_T5.js index 2d0733b670..872dc04eea 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T5.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\sb-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\sb-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\sb-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T6.js b/test/built-ins/RegExp/S15.10.2.15_A1_T6.js index 112854d4a5..3c68c14b67 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T6.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T6.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\Sb-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\Sb-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\Sb-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T7.js b/test/built-ins/RegExp/S15.10.2.15_A1_T7.js index b6679943e6..90f96e1c1b 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T7.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T7.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\wb-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\wb-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\wb-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T8.js b/test/built-ins/RegExp/S15.10.2.15_A1_T8.js index f1c228a56a..28307c95bc 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T8.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T8.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\Wb-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\Wb-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\Wb-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.15_A1_T9.js b/test/built-ins/RegExp/S15.10.2.15_A1_T9.js index 1fd3b1a5a3..0d59035aff 100644 --- a/test/built-ins/RegExp/S15.10.2.15_A1_T9.js +++ b/test/built-ins/RegExp/S15.10.2.15_A1_T9.js @@ -16,11 +16,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[\\0b-G]/.exec("a") throw SyntaxError. Actual: ' + (new RegExp("[\\0b-G]").exec("a"))); } catch (e) { - if((e instanceof SyntaxError) !== true){ - throw new Test262Error('#1.2: /[\\0b-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T1.js b/test/built-ins/RegExp/S15.10.2.3_A1_T1.js index dad4766a0d..12ea5388c9 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T1.js @@ -16,24 +16,28 @@ var __expected = ["a"]; __expected.index = 0; __expected.input = "abc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a|ab/.exec("abc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a|ab/.exec("abc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a|ab/.exec("abc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a|ab/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T10.js b/test/built-ins/RegExp/S15.10.2.3_A1_T10.js index e6f9800ad8..b987d4d68a 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T10.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T10.js @@ -16,24 +16,28 @@ var __expected = ["eF"]; __expected.index = 3; __expected.input = "AEKeFCDab"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(?:ab|cd)+|ef/i.exec("AEKeFCDab"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(?:ab|cd)+|ef/i.exec("AEKeFCDab"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(?:ab|cd)+|ef/i.exec("AEKeFCDab"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(?:ab|cd)+|ef/i.exec("AEKeFCDab"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T11.js b/test/built-ins/RegExp/S15.10.2.3_A1_T11.js index e7e63932d0..704f86729d 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T11.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T11.js @@ -16,24 +16,28 @@ var __expected = ["11111"]; __expected.index = 0; __expected.input = "1111111111111111"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /11111|111/.exec("1111111111111111"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /11111|111/.exec("1111111111111111"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /11111|111/.exec("1111111111111111"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /11111|111/.exec("1111111111111111"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T12.js b/test/built-ins/RegExp/S15.10.2.3_A1_T12.js index d62345c9ac..1086912d0e 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T12.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T12.js @@ -16,24 +16,28 @@ var __expected = ["abc"]; __expected.index = 0; __expected.input = "abc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /xyz|.../.exec("abc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /xyz|.../.exec("abc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /xyz|.../.exec("abc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /xyz|.../.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T13.js b/test/built-ins/RegExp/S15.10.2.3_A1_T13.js index 265b05161b..f4e5f7dfec 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T13.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T13.js @@ -16,24 +16,28 @@ var __expected = ["abc","a"]; __expected.index = 0; __expected.input = "abc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(.)..|abc/.exec("abc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(.)..|abc/.exec("abc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(.)..|abc/.exec("abc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(.)..|abc/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T14.js b/test/built-ins/RegExp/S15.10.2.3_A1_T14.js index 1866f69f44..f43a9e7040 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T14.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T14.js @@ -16,24 +16,28 @@ var __expected = ["color: grey","e"]; __expected.index = 0; __expected.input = "color: grey"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /.+: gr(a|e)y/.exec("color: grey"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /.+: gr(a|e)y/.exec("color: grey"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /.+: gr(a|e)y/.exec("color: grey"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /.+: gr(a|e)y/.exec("color: grey"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T15.js b/test/built-ins/RegExp/S15.10.2.3_A1_T15.js index 5a235efcc3..b3c2fdd25b 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T15.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T15.js @@ -18,24 +18,28 @@ var __expected = ["Bob",undefined,"Bob", undefined, undefined]; __expected.index = 3; __expected.input = "Hi Bob"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(Rob)|(Bob)|(Robert)|(Bobby)/.exec("Hi Bob"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(Rob)|(Bob)|(Robert)|(Bobby)/.exec("Hi Bob"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(Rob)|(Bob)|(Robert)|(Bobby)/.exec("Hi Bob"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(Rob)|(Bob)|(Robert)|(Bobby)/.exec("Hi Bob"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T16.js b/test/built-ins/RegExp/S15.10.2.3_A1_T16.js index f75e6873cf..90a1d66229 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T16.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T16.js @@ -16,24 +16,28 @@ var __expected = ["",""]; __expected.index = 0; __expected.input = ""; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /()|/.exec(""); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /()|/.exec(""); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /()|/.exec(""); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /()|/.exec(""); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T17.js b/test/built-ins/RegExp/S15.10.2.3_A1_T17.js index 7ec57ac29a..24a874dc40 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T17.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T17.js @@ -16,24 +16,28 @@ var __expected = ["",undefined]; __expected.index = 0; __expected.input = ""; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /|()/.exec(""); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /|()/.exec(""); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /|()/.exec(""); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /|()/.exec(""); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T2.js b/test/built-ins/RegExp/S15.10.2.3_A1_T2.js index 1d6e043a19..4ba331770d 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T2.js @@ -16,24 +16,28 @@ var __expected = ["abc", "a", "a", undefined, "bc", undefined, "bc"]; __expected.index = 0; __expected.input = "abc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /((a)|(ab))((c)|(bc))/.exec("abc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /((a)|(ab))((c)|(bc))/.exec("abc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /((a)|(ab))((c)|(bc))/.exec("abc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /((a)|(ab))((c)|(bc))/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T3.js b/test/built-ins/RegExp/S15.10.2.3_A1_T3.js index f74d9cbb17..6b39758b16 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T3.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T3.js @@ -18,24 +18,28 @@ var __expected = ["cour"]; __expected.index = 13; __expected.input = "2, 12 and of course repeat 12"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\d{3}|[a-z]{4}/.exec("2, 12 and of course repeat 12"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\d{3}|[a-z]{4}/.exec("2, 12 and of course repeat 12"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\d{3}|[a-z]{4}/.exec("2, 12 and of course repeat 12"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\d{3}|[a-z]{4}/.exec("2, 12 and of course repeat 12"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T4.js b/test/built-ins/RegExp/S15.10.2.3_A1_T4.js index 385a68a474..4a6432900a 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T4.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T4.js @@ -18,24 +18,28 @@ var __expected = ["234"]; __expected.index = 10; __expected.input = "2, 12 and 234 AND of course repeat 12"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\d{3}|[a-z]{4}/.exec("2, 12 and 234 AND of course repeat 12"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\d{3}|[a-z]{4}/.exec("2, 12 and 234 AND of course repeat 12"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\d{3}|[a-z]{4}/.exec("2, 12 and 234 AND of course repeat 12"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\d{3}|[a-z]{4}/.exec("2, 12 and 234 AND of course repeat 12"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T5.js b/test/built-ins/RegExp/S15.10.2.3_A1_T5.js index 1b5a8c0921..8d14a92d6f 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T5.js @@ -14,7 +14,4 @@ description: > var __executed = /\d{3}|[a-z]{4}/.test("2, 12 and 23 AND 0.00.1"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /\\d{3}|[a-z]{4}/.test("2, 12 and 23 AND 0.00.1") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T6.js b/test/built-ins/RegExp/S15.10.2.3_A1_T6.js index 262248a3ae..49f3f01234 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T6.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T6.js @@ -16,24 +16,28 @@ var __expected = ["CD"]; __expected.index = 4; __expected.input = "AEKFCD"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /ab|cd|ef/i.exec("AEKFCD"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /ab|cd|ef/i.exec("AEKFCD"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /ab|cd|ef/i.exec("AEKFCD"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /ab|cd|ef/i.exec("AEKFCD"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T7.js b/test/built-ins/RegExp/S15.10.2.3_A1_T7.js index e9f92333b9..d3e7cf4abf 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T7.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T7.js @@ -12,7 +12,4 @@ description: Execute /ab|cd|ef/.test("AEKFCD") and check results var __executed = /ab|cd|ef/.test("AEKFCD"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /ab|cd|ef/.test("AEKFCD") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T8.js b/test/built-ins/RegExp/S15.10.2.3_A1_T8.js index 7c66cb409d..7ed4226474 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T8.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T8.js @@ -16,24 +16,28 @@ var __expected = ["CD"]; __expected.index = 4; __expected.input = "AEKFCD"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(?:ab|cd)+|ef/i.exec("AEKFCD"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(?:ab|cd)+|ef/i.exec("AEKFCD"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(?:ab|cd)+|ef/i.exec("AEKFCD"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(?:ab|cd)+|ef/i.exec("AEKFCD"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.3_A1_T9.js b/test/built-ins/RegExp/S15.10.2.3_A1_T9.js index 3247ac6907..74692a0b86 100644 --- a/test/built-ins/RegExp/S15.10.2.3_A1_T9.js +++ b/test/built-ins/RegExp/S15.10.2.3_A1_T9.js @@ -16,24 +16,28 @@ var __expected = ["CDab"]; __expected.index = 4; __expected.input = "AEKFCDab"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(?:ab|cd)+|ef/i.exec("AEKFCDab"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(?:ab|cd)+|ef/i.exec("AEKFCDab"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(?:ab|cd)+|ef/i.exec("AEKFCDab"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(?:ab|cd)+|ef/i.exec("AEKFCDab"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.5_A1_T1.js b/test/built-ins/RegExp/S15.10.2.5_A1_T1.js index 1e61c23652..71a1093a51 100644 --- a/test/built-ins/RegExp/S15.10.2.5_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.5_A1_T1.js @@ -15,24 +15,28 @@ var __expected = ["abcde"]; __expected.index = 0; __expected.input = "abcdefghi"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a[a-z]{2,4}/.exec("abcdefghi"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a[a-z]{2,4}/.exec("abcdefghi"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a[a-z]{2,4}/.exec("abcdefghi"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a[a-z]{2,4}/.exec("abcdefghi"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.5_A1_T2.js b/test/built-ins/RegExp/S15.10.2.5_A1_T2.js index 3bde0c1d30..173f67722c 100644 --- a/test/built-ins/RegExp/S15.10.2.5_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.2.5_A1_T2.js @@ -15,24 +15,28 @@ var __expected = ["abc"]; __expected.index = 0; __expected.input = "abcdefghi"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a[a-z]{2,4}?/.exec("abcdefghi"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a[a-z]{2,4}?/.exec("abcdefghi"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a[a-z]{2,4}?/.exec("abcdefghi"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a[a-z]{2,4}?/.exec("abcdefghi"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.5_A1_T3.js b/test/built-ins/RegExp/S15.10.2.5_A1_T3.js index cfacee10cb..052b5b73e3 100644 --- a/test/built-ins/RegExp/S15.10.2.5_A1_T3.js +++ b/test/built-ins/RegExp/S15.10.2.5_A1_T3.js @@ -15,24 +15,28 @@ var __expected = ["aaba", "ba"]; __expected.index = 0; __expected.input = "aabaac"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(aa|aabaac|ba|b|c)*/.exec("aabaac"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(aa|aabaac|ba|b|c)*/.exec("aabaac"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(aa|aabaac|ba|b|c)*/.exec("aabaac"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(aa|aabaac|ba|b|c)*/.exec("aabaac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.5_A1_T4.js b/test/built-ins/RegExp/S15.10.2.5_A1_T4.js index ac05549495..705a3caebf 100644 --- a/test/built-ins/RegExp/S15.10.2.5_A1_T4.js +++ b/test/built-ins/RegExp/S15.10.2.5_A1_T4.js @@ -15,24 +15,28 @@ var __expected = ["zaacbbbcac", "z", "ac", "a", undefined, "c"]; __expected.index = 0; __expected.input = "zaacbbbcac"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(z)((a+)?(b+)?(c))*/.exec("zaacbbbcac"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(z)((a+)?(b+)?(c))*/.exec("zaacbbbcac"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(z)((a+)?(b+)?(c))*/.exec("zaacbbbcac"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(z)((a+)?(b+)?(c))*/.exec("zaacbbbcac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.5_A1_T5.js b/test/built-ins/RegExp/S15.10.2.5_A1_T5.js index fe9b6dd325..6b655b8442 100644 --- a/test/built-ins/RegExp/S15.10.2.5_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.2.5_A1_T5.js @@ -15,24 +15,28 @@ var __expected = ["b", ""]; __expected.index = 0; __expected.input = "baaaac"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(a*)b\\1+/.exec("baaaac"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(a*)b\\1+/.exec("baaaac"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(a*)b\\1+/.exec("baaaac"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(a*)b\\1+/.exec("baaaac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A1_T1.js b/test/built-ins/RegExp/S15.10.2.6_A1_T1.js index 5633781e59..4c4d2b4b97 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.6_A1_T1.js @@ -11,7 +11,4 @@ description: Execute /s$/.test("pairs\nmakes\tdouble") and check results var __executed = /s$/.test("pairs\nmakes\tdouble"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /s$/.test("pairs\\nmakes\\tdouble") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.6_A1_T2.js b/test/built-ins/RegExp/S15.10.2.6_A1_T2.js index 72d7739ab1..821445268f 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.2.6_A1_T2.js @@ -15,24 +15,28 @@ var __expected = ["e"]; __expected.index = 17; __expected.input = "pairs\nmakes\tdouble"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /e$/.exec("pairs\\nmakes\\tdouble"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /e$/.exec("pairs\\nmakes\\tdouble"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /e$/.exec("pairs\\nmakes\\tdouble"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /e$/.exec("pairs\\nmakes\\tdouble"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A1_T3.js b/test/built-ins/RegExp/S15.10.2.6_A1_T3.js index e5b2f30ac0..5b09530575 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A1_T3.js +++ b/test/built-ins/RegExp/S15.10.2.6_A1_T3.js @@ -15,24 +15,28 @@ var __expected = ["s"]; __expected.index = 4; __expected.input = "pairs\nmakes\tdouble"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /s$/m.exec("pairs\\nmakes\\tdouble"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /s$/m.exec("pairs\\nmakes\\tdouble"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /s$/m.exec("pairs\\nmakes\\tdouble"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /s$/m.exec("pairs\\nmakes\\tdouble"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A1_T4.js b/test/built-ins/RegExp/S15.10.2.6_A1_T4.js index 0086678caf..affdf48240 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A1_T4.js +++ b/test/built-ins/RegExp/S15.10.2.6_A1_T4.js @@ -15,24 +15,28 @@ var __expected = ["s"]; __expected.index = 4; __expected.input = "pairs\nmakes\tdouble"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^e]$/mg.exec("pairs\\nmakes\\tdouble"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^e]$/mg.exec("pairs\\nmakes\\tdouble"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^e]$/mg.exec("pairs\\nmakes\\tdouble"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^e]$/mg.exec("pairs\\nmakes\\tdouble"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A1_T5.js b/test/built-ins/RegExp/S15.10.2.6_A1_T5.js index 8b0209692f..3aec5ecb1b 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.2.6_A1_T5.js @@ -17,24 +17,28 @@ var __expected = ["es"]; __expected.index = 17; __expected.input = "pairs\nmakes\tdoubles"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /es$/mg.exec("pairs\\nmakes\\tdoubl\\u0065s"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /es$/mg.exec("pairs\\nmakes\\tdoubl\\u0065s"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /es$/mg.exec("pairs\\nmakes\\tdoubl\\u0065s"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /es$/mg.exec("pairs\\nmakes\\tdoubl\\u0065s"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A2_T1.js b/test/built-ins/RegExp/S15.10.2.6_A2_T1.js index 5943e67060..7c7983b860 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A2_T1.js +++ b/test/built-ins/RegExp/S15.10.2.6_A2_T1.js @@ -11,7 +11,4 @@ description: Execute /^m/.test("pairs\nmakes\tdouble") and check results var __executed = /^m/.test("pairs\nmakes\tdouble"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /^m/.test("pairs\\nmakes\\tdouble") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.6_A2_T10.js b/test/built-ins/RegExp/S15.10.2.6_A2_T10.js index ebffc480a6..f13ebfec4f 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A2_T10.js +++ b/test/built-ins/RegExp/S15.10.2.6_A2_T10.js @@ -15,24 +15,28 @@ var __expected = ["123"]; __expected.index = 4; __expected.input = "abc\n123xyz"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^\\d+/m.exec("abc\\n123xyz"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^\\d+/m.exec("abc\\n123xyz"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^\\d+/m.exec("abc\\n123xyz"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^\\d+/m.exec("abc\\n123xyz"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A2_T2.js b/test/built-ins/RegExp/S15.10.2.6_A2_T2.js index e76f8ea58c..246d35824d 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A2_T2.js +++ b/test/built-ins/RegExp/S15.10.2.6_A2_T2.js @@ -15,24 +15,28 @@ var __expected = ["m"]; __expected.index = 6; __expected.input = "pairs\nmakes\tdouble"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^m/m.exec("pairs\\nmakes\\tdouble"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^m/m.exec("pairs\\nmakes\\tdouble"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^m/m.exec("pairs\\nmakes\\tdouble"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^m/m.exec("pairs\\nmakes\\tdouble"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A2_T3.js b/test/built-ins/RegExp/S15.10.2.6_A2_T3.js index 22fb26e3b4..0dde75c65d 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A2_T3.js +++ b/test/built-ins/RegExp/S15.10.2.6_A2_T3.js @@ -17,24 +17,28 @@ var __expected = ["pa"]; __expected.index = 0; __expected.input = "pairs\nmakes\tdouble\npesos"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^p[a-z]/.exec("pairs\\nmakes\\tdouble\\npesos"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^p[a-z]/.exec("pairs\\nmakes\\tdouble\\npesos"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^p[a-z]/.exec("pairs\\nmakes\\tdouble\\npesos"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^p[a-z]/.exec("pairs\\nmakes\\tdouble\\npesos"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A2_T4.js b/test/built-ins/RegExp/S15.10.2.6_A2_T4.js index e36ec8d305..5e79d9b09f 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A2_T4.js +++ b/test/built-ins/RegExp/S15.10.2.6_A2_T4.js @@ -17,24 +17,28 @@ var __expected = ["pe"]; __expected.index = 19; __expected.input = "pairs\nmakes\tdouble\npesos"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^p[b-z]/m.exec("pairs\\nmakes\\tdouble\\npesos"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^p[b-z]/m.exec("pairs\\nmakes\\tdouble\\npesos"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^p[b-z]/m.exec("pairs\\nmakes\\tdouble\\npesos"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^p[b-z]/m.exec("pairs\\nmakes\\tdouble\\npesos"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A2_T5.js b/test/built-ins/RegExp/S15.10.2.6_A2_T5.js index 1609fb8736..575d4724c1 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A2_T5.js +++ b/test/built-ins/RegExp/S15.10.2.6_A2_T5.js @@ -17,24 +17,28 @@ var __expected = ["m"]; __expected.index = 6; __expected.input = "pairs\nmakes\tdouble\npesos"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^[^p]/m.exec("pairs\\nmakes\\tdouble\\npesos"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^[^p]/m.exec("pairs\\nmakes\\tdouble\\npesos"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^[^p]/m.exec("pairs\\nmakes\\tdouble\\npesos"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^[^p]/m.exec("pairs\\nmakes\\tdouble\\npesos"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A2_T6.js b/test/built-ins/RegExp/S15.10.2.6_A2_T6.js index 0510be4263..bcd47d7a4f 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A2_T6.js +++ b/test/built-ins/RegExp/S15.10.2.6_A2_T6.js @@ -15,24 +15,28 @@ var __expected = ["ab"]; __expected.index = 0; __expected.input = "abcde"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^ab/.exec("abcde"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^ab/.exec("abcde"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^ab/.exec("abcde"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^ab/.exec("abcde"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A2_T7.js b/test/built-ins/RegExp/S15.10.2.6_A2_T7.js index 08f556fe98..b73e004706 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A2_T7.js +++ b/test/built-ins/RegExp/S15.10.2.6_A2_T7.js @@ -11,7 +11,4 @@ description: Execute /^..^e/.test("ab\ncde") and check results var __executed = /^..^e/.test("ab\ncde"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /^..^e/.test("ab\\ncde") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.6_A2_T8.js b/test/built-ins/RegExp/S15.10.2.6_A2_T8.js index 27593d8691..114bf23135 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A2_T8.js +++ b/test/built-ins/RegExp/S15.10.2.6_A2_T8.js @@ -11,7 +11,4 @@ description: Execute /^xxx/.test("yyyyy") and check results var __executed = /^xxx/.test("yyyyy"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /^xxx/.test("yyyyy") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.6_A2_T9.js b/test/built-ins/RegExp/S15.10.2.6_A2_T9.js index 8fed2f9141..b8740e9545 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A2_T9.js +++ b/test/built-ins/RegExp/S15.10.2.6_A2_T9.js @@ -15,24 +15,28 @@ var __expected = ["^^^"]; __expected.index = 0; __expected.input = "^^^x"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^\\^+/.exec("^^^x"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^\\^+/.exec("^^^x"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^\\^+/.exec("^^^x"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^\\^+/.exec("^^^x"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T1.js b/test/built-ins/RegExp/S15.10.2.6_A3_T1.js index 2f7b6bcc39..3352bd8e07 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T1.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T1.js @@ -17,24 +17,28 @@ var __expected = ["p"]; __expected.index = 0; __expected.input = "pilot\nsoviet robot\topenoffice"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\bp/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\bp/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\bp/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\bp/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T10.js b/test/built-ins/RegExp/S15.10.2.6_A3_T10.js index a6e9fbf089..390030dbff 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T10.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T10.js @@ -17,24 +17,28 @@ var __expected = ["robot"]; __expected.index = 13; __expected.input = "pilot\nsoviet robot\topenoffice"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\brobot\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\brobot\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\brobot\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\brobot\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T11.js b/test/built-ins/RegExp/S15.10.2.6_A3_T11.js index 798cbfc074..eeaae7cef5 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T11.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T11.js @@ -17,24 +17,28 @@ var __expected = ["pilot"]; __expected.index = 0; __expected.input = "pilot\nsoviet robot\topenoffice"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\b\\w{5}\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\b\\w{5}\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\b\\w{5}\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\b\\w{5}\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T12.js b/test/built-ins/RegExp/S15.10.2.6_A3_T12.js index 08c4c1392a..9038f27747 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T12.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T12.js @@ -17,24 +17,28 @@ var __expected = ["op"]; __expected.index = 19; __expected.input = "pilot\nsoviet robot\topenoffice"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\bop/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\bop/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\bop/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\bop/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T13.js b/test/built-ins/RegExp/S15.10.2.6_A3_T13.js index 7f5acff6fc..0560c641b0 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T13.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T13.js @@ -13,7 +13,4 @@ description: > var __executed = /op\b/.test("pilot\nsoviet robot\topenoffice"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /op\\b/.test("pilot\\nsoviet robot\\topenoffice") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T14.js b/test/built-ins/RegExp/S15.10.2.6_A3_T14.js index e1fa64ac4e..ac665eb23a 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T14.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T14.js @@ -17,24 +17,28 @@ var __expected = ["e"]; __expected.index = 28; __expected.input = "pilot\nsoviet robot\topenoffice"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /e\\b/.exec("pilot\\nsoviet robot\\topenoffic\\u0065"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /e\\b/.exec("pilot\\nsoviet robot\\topenoffic\\u0065"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /e\\b/.exec("pilot\\nsoviet robot\\topenoffic\\u0065"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /e\\b/.exec("pilot\\nsoviet robot\\topenoffic\\u0065"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T15.js b/test/built-ins/RegExp/S15.10.2.6_A3_T15.js index 79bd501810..17c56a38b7 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T15.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T15.js @@ -13,7 +13,4 @@ description: > var __executed = /\be/.test("pilot\nsoviet robot\topenoffic\u0065"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /\\be/.test("pilot\\nsoviet robot\\topenoffic\\u0065") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T2.js b/test/built-ins/RegExp/S15.10.2.6_A3_T2.js index bbcfe454e0..61ee7ef108 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T2.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T2.js @@ -17,24 +17,28 @@ var __expected = ["ot"]; __expected.index = 3; __expected.input = "pilot\nsoviet robot\topenoffice"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /ot\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /ot\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /ot\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /ot\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T3.js b/test/built-ins/RegExp/S15.10.2.6_A3_T3.js index 6b113ec35d..a7ea91830c 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T3.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T3.js @@ -13,7 +13,4 @@ description: > var __executed = /\bot/.test("pilot\nsoviet robot\topenoffice"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /\\bot/.test("pilot\\nsoviet robot\\topenoffice") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T4.js b/test/built-ins/RegExp/S15.10.2.6_A3_T4.js index da3bee857a..ae69c4cd3f 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T4.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T4.js @@ -17,24 +17,28 @@ var __expected = ["so"]; __expected.index = 6; __expected.input = "pilot\nsoviet robot\topenoffice"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\bso/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\bso/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\bso/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\bso/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T5.js b/test/built-ins/RegExp/S15.10.2.6_A3_T5.js index 69f4d15669..d84a054e10 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T5.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T5.js @@ -13,7 +13,4 @@ description: > var __executed = /so\b/.test("pilot\nsoviet robot\topenoffice"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /so\\b/.test("pilot\\nsoviet robot\\topenoffice") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T6.js b/test/built-ins/RegExp/S15.10.2.6_A3_T6.js index ec8b695b2e..ac01ac96fe 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T6.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T6.js @@ -17,24 +17,28 @@ var __expected = ["Ot"]; __expected.index = 3; __expected.input = "pilOt\nsoviet robot\topenoffice"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^o]t\\b/.exec("pilOt\\nsoviet robot\\topenoffice"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^o]t\\b/.exec("pilOt\\nsoviet robot\\topenoffice"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^o]t\\b/.exec("pilOt\\nsoviet robot\\topenoffice"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^o]t\\b/.exec("pilOt\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T7.js b/test/built-ins/RegExp/S15.10.2.6_A3_T7.js index 7d6ac94131..d114bfb731 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T7.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T7.js @@ -17,24 +17,28 @@ var __expected = ["et"]; __expected.index = 10; __expected.input = "pilOt\nsoviet robot\topenoffice"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^o]t\\b/i.exec("pilOt\\nsoviet robot\\topenoffice"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^o]t\\b/i.exec("pilOt\\nsoviet robot\\topenoffice"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^o]t\\b/i.exec("pilOt\\nsoviet robot\\topenoffice"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^o]t\\b/i.exec("pilOt\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T8.js b/test/built-ins/RegExp/S15.10.2.6_A3_T8.js index 1d851e657c..91f7e8b1f2 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T8.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T8.js @@ -17,24 +17,28 @@ var __expected = ["ro"]; __expected.index = 13; __expected.input = "pilot\nsoviet robot\topenoffice"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\bro/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\bro/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\bro/.exec("pilot\\nsoviet robot\\topenoffice"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\bro/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A3_T9.js b/test/built-ins/RegExp/S15.10.2.6_A3_T9.js index 218b671422..b83c92d6bd 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A3_T9.js +++ b/test/built-ins/RegExp/S15.10.2.6_A3_T9.js @@ -13,7 +13,4 @@ description: > var __executed = /r\b/.test("pilot\nsoviet robot\topenoffice"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /r\\b/.test("pilot\\nsoviet robot\\topenoffice") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.6_A4_T1.js b/test/built-ins/RegExp/S15.10.2.6_A4_T1.js index 7fdb00435d..b82911c6e6 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A4_T1.js +++ b/test/built-ins/RegExp/S15.10.2.6_A4_T1.js @@ -17,24 +17,28 @@ var __expected = ["evil"]; __expected.index = 1; __expected.input = "devils arise\tfor\nevil"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\Bevil\\B/.exec("devils arise\\tfor\\nevil"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\Bevil\\B/.exec("devils arise\\tfor\\nevil"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\Bevil\\B/.exec("devils arise\\tfor\\nevil"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\Bevil\\B/.exec("devils arise\\tfor\\nevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A4_T2.js b/test/built-ins/RegExp/S15.10.2.6_A4_T2.js index d0ae1ccb00..476362143e 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A4_T2.js +++ b/test/built-ins/RegExp/S15.10.2.6_A4_T2.js @@ -17,24 +17,28 @@ var __expected = ["re"]; __expected.index = 17; __expected.input = "devils arise\tfor\nrevil"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[f-z]e\\B/.exec("devils arise\\tfor\\nrevil"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[f-z]e\\B/.exec("devils arise\\tfor\\nrevil"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[f-z]e\\B/.exec("devils arise\\tfor\\nrevil"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[f-z]e\\B/.exec("devils arise\\tfor\\nrevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A4_T3.js b/test/built-ins/RegExp/S15.10.2.6_A4_T3.js index 0400ee8b49..8f17507680 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A4_T3.js +++ b/test/built-ins/RegExp/S15.10.2.6_A4_T3.js @@ -15,24 +15,28 @@ var __expected = ["O"]; __expected.index = 14; __expected.input = "devils arise\tfOr\nrevil"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\Bo\\B/i.exec("devils arise\\tfOr\\nrevil"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\Bo\\B/i.exec("devils arise\\tfOr\\nrevil"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\Bo\\B/i.exec("devils arise\\tfOr\\nrevil"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\Bo\\B/i.exec("devils arise\\tfOr\\nrevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A4_T4.js b/test/built-ins/RegExp/S15.10.2.6_A4_T4.js index 5e35aa4b84..537721c50c 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A4_T4.js +++ b/test/built-ins/RegExp/S15.10.2.6_A4_T4.js @@ -15,24 +15,28 @@ var __expected = ["e"]; __expected.index = 1; __expected.input = "devils arise\tfor\nrevil"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\B\\w\\B/.exec("devils arise\\tfor\\nrevil"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\B\\w\\B/.exec("devils arise\\tfor\\nrevil"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\B\\w\\B/.exec("devils arise\\tfor\\nrevil"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\B\\w\\B/.exec("devils arise\\tfor\\nrevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A4_T5.js b/test/built-ins/RegExp/S15.10.2.6_A4_T5.js index 6d56ac2e74..20c58334ab 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A4_T5.js +++ b/test/built-ins/RegExp/S15.10.2.6_A4_T5.js @@ -15,24 +15,28 @@ var __expected = ["d"]; __expected.index = 0; __expected.input = "devils arise\tfor\nrevil"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\w\\B/.exec("devils arise\\tfor\\nrevil"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\w\\B/.exec("devils arise\\tfor\\nrevil"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\w\\B/.exec("devils arise\\tfor\\nrevil"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\w\\B/.exec("devils arise\\tfor\\nrevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A4_T6.js b/test/built-ins/RegExp/S15.10.2.6_A4_T6.js index 829be0a35c..30bd0f1931 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A4_T6.js +++ b/test/built-ins/RegExp/S15.10.2.6_A4_T6.js @@ -15,24 +15,28 @@ var __expected = ["e"]; __expected.index = 1; __expected.input = "devils arise\tfor\nrevil"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\B\\w/.exec("devils arise\\tfor\\nrevil"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\B\\w/.exec("devils arise\\tfor\\nrevil"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\B\\w/.exec("devils arise\\tfor\\nrevil"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\B\\w/.exec("devils arise\\tfor\\nrevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A4_T7.js b/test/built-ins/RegExp/S15.10.2.6_A4_T7.js index ab02b28368..caf49c42a0 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A4_T7.js +++ b/test/built-ins/RegExp/S15.10.2.6_A4_T7.js @@ -17,24 +17,28 @@ var __expected = ["il a"]; __expected.index = 3; __expected.input = "devil arise\tforzzx\nevils"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\B[^z]{4}\B/.exec("devil arise\\tforzzx\\nevils"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\B[^z]{4}\B/.exec("devil arise\\tforzzx\\nevils"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\B[^z]{4}\B/.exec("devil arise\\tforzzx\\nevils"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\B[^z]{4}\B/.exec("devil arise\\tforzzx\\nevils"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A4_T8.js b/test/built-ins/RegExp/S15.10.2.6_A4_T8.js index c33658571f..41c37a29e9 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A4_T8.js +++ b/test/built-ins/RegExp/S15.10.2.6_A4_T8.js @@ -17,24 +17,28 @@ var __expected = ["orzz"]; __expected.index = 13; __expected.input = "devil arise\tforzzx\nevils"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\B\\w{4}\\B/.exec("devil arise\\tforzzx\\nevils"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\B\\w{4}\\B/.exec("devil arise\\tforzzx\\nevils"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\B\\w{4}\\B/.exec("devil arise\\tforzzx\\nevils"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\B\\w{4}\\B/.exec("devil arise\\tforzzx\\nevils"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A5_T1.js b/test/built-ins/RegExp/S15.10.2.6_A5_T1.js index 2d244f51d8..004e2b7324 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A5_T1.js +++ b/test/built-ins/RegExp/S15.10.2.6_A5_T1.js @@ -15,24 +15,28 @@ var __expected = ["robot"]; __expected.index = 0; __expected.input = "robot"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^^^^^^^robot$$$$/.exec("robot"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^^^^^^^robot$$$$/.exec("robot"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^^^^^^^robot$$$$/.exec("robot"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^^^^^^^robot$$$$/.exec("robot"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A5_T2.js b/test/built-ins/RegExp/S15.10.2.6_A5_T2.js index e462192c9c..acdf8af74f 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A5_T2.js +++ b/test/built-ins/RegExp/S15.10.2.6_A5_T2.js @@ -17,24 +17,28 @@ var __expected = ["bot"]; __expected.index = 2; __expected.input = "robot wall-e"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\B\\B\\B\\B\\B\\Bbot\\b\\b\\b\\b\\b\\b\\b/.exec("robot wall-e"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\B\\B\\B\\B\\B\\Bbot\\b\\b\\b\\b\\b\\b\\b/.exec("robot wall-e"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\B\\B\\B\\B\\B\\Bbot\\b\\b\\b\\b\\b\\b\\b/.exec("robot wall-e"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\B\\B\\B\\B\\B\\Bbot\\b\\b\\b\\b\\b\\b\\b/.exec("robot wall-e"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A6_T1.js b/test/built-ins/RegExp/S15.10.2.6_A6_T1.js index 79947b5c0b..151a0a1881 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A6_T1.js +++ b/test/built-ins/RegExp/S15.10.2.6_A6_T1.js @@ -15,24 +15,28 @@ var __expected = ["Hello World"]; __expected.index = 0; __expected.input = "Hello World"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^.*?$/.exec("Hello World"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^.*?$/.exec("Hello World"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^.*?$/.exec("Hello World"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^.*?$/.exec("Hello World"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A6_T2.js b/test/built-ins/RegExp/S15.10.2.6_A6_T2.js index 50666cafcb..537d0881c5 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A6_T2.js +++ b/test/built-ins/RegExp/S15.10.2.6_A6_T2.js @@ -13,24 +13,28 @@ var __expected = [""]; __expected.index = 0; __expected.input = "Hello World"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^.*?/.exec("Hello World"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^.*?/.exec("Hello World"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^.*?/.exec("Hello World"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^.*?/.exec("Hello World"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A6_T3.js b/test/built-ins/RegExp/S15.10.2.6_A6_T3.js index a304bcdf75..e73fc54317 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A6_T3.js +++ b/test/built-ins/RegExp/S15.10.2.6_A6_T3.js @@ -13,24 +13,28 @@ var __expected = ["Hello:", ":"]; __expected.index = 0; __expected.input = "Hello: World"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^.*?(:|$)/.exec("Hello: World"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^.*?(:|$)/.exec("Hello: World"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^.*?(:|$)/.exec("Hello: World"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^.*?(:|$)/.exec("Hello: World"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.6_A6_T4.js b/test/built-ins/RegExp/S15.10.2.6_A6_T4.js index c2389ba4c9..19bd47575f 100644 --- a/test/built-ins/RegExp/S15.10.2.6_A6_T4.js +++ b/test/built-ins/RegExp/S15.10.2.6_A6_T4.js @@ -13,24 +13,28 @@ var __expected = ["Hello: World", ""]; __expected.index = 0; __expected.input = "Hello: World"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^.*(:|$)/.exec("Hello: World"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^.*(:|$)/.exec("Hello: World"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^.*(:|$)/.exec("Hello: World"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^.*(:|$)/.exec("Hello: World"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T1.js b/test/built-ins/RegExp/S15.10.2.7_A1_T1.js index 7e04e62b79..29eafbfbae 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T1.js @@ -15,24 +15,28 @@ var __expected = ["42"]; __expected.index = 14; __expected.input = "the answer is 42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\d{2,4}/.exec("the answer is 42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\d{2,4}/.exec("the answer is 42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\d{2,4}/.exec("the answer is 42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\d{2,4}/.exec("the answer is 42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T10.js b/test/built-ins/RegExp/S15.10.2.7_A1_T10.js index 2d9e8cb39a..4be43d416e 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T10.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T10.js @@ -15,24 +15,28 @@ var __expected = ["bbbbc"]; __expected.index = 3; __expected.input = "aaabbbbcccddeeeefffff"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /b{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /b{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /b{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /b{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T11.js b/test/built-ins/RegExp/S15.10.2.7_A1_T11.js index 6a60b1b7c0..7faeb090cb 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T11.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T11.js @@ -15,24 +15,28 @@ var __expected = ["bc"]; __expected.index = 6; __expected.input = "aaabbbbcccddeeeefffff"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /bx{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /bx{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /bx{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /bx{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T12.js b/test/built-ins/RegExp/S15.10.2.7_A1_T12.js index 403396e1cb..bcc2c5ef84 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T12.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T12.js @@ -15,24 +15,28 @@ var __expected = ["weirwerdf"]; __expected.index = 0; __expected.input = "weirwerdf"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /.{0,93}/.exec("weirwerdf"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /.{0,93}/.exec("weirwerdf"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /.{0,93}/.exec("weirwerdf"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /.{0,93}/.exec("weirwerdf"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T2.js b/test/built-ins/RegExp/S15.10.2.7_A1_T2.js index f68f18b941..6fa3e50a46 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T2.js @@ -11,7 +11,4 @@ description: Execute /\d{2,4}/.test("the 7 movie") and check results var __executed = /\d{2,4}/.test("the 7 movie"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /\\d{2,4}/.test("the 7 movie") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T3.js b/test/built-ins/RegExp/S15.10.2.7_A1_T3.js index 3ea78a7d51..e7ca562708 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T3.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T3.js @@ -17,24 +17,28 @@ var __expected = ["2000"]; __expected.index = 4; __expected.input = "the 20000 Leagues Under the Sea book"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\d{2,4}/.exec("the 20000 Leagues Under the Sea book"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\d{2,4}/.exec("the 20000 Leagues Under the Sea book"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\d{2,4}/.exec("the 20000 Leagues Under the Sea book"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\d{2,4}/.exec("the 20000 Leagues Under the Sea book"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T4.js b/test/built-ins/RegExp/S15.10.2.7_A1_T4.js index 6da8d0cbe7..149a446a05 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T4.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T4.js @@ -15,24 +15,28 @@ var __expected = ["451"]; __expected.index = 15; __expected.input = "the Fahrenheit 451 book"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\d{2,4}/.exec("the Fahrenheit 451 book"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\d{2,4}/.exec("the Fahrenheit 451 book"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\d{2,4}/.exec("the Fahrenheit 451 book"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\d{2,4}/.exec("the Fahrenheit 451 book"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T5.js b/test/built-ins/RegExp/S15.10.2.7_A1_T5.js index c7a2ae99c9..a2d2901d6b 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T5.js @@ -15,24 +15,28 @@ var __expected = ["1984"]; __expected.index = 4; __expected.input = "the 1984 novel"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\d{2,4}/.exec("the 1984 novel"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\d{2,4}/.exec("the 1984 novel"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\d{2,4}/.exec("the 1984 novel"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\d{2,4}/.exec("the 1984 novel"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T6.js b/test/built-ins/RegExp/S15.10.2.7_A1_T6.js index f79f475c02..0c34a90d79 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T6.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T6.js @@ -15,24 +15,28 @@ var __expected = ["011"]; __expected.index = 2; __expected.input = "0a011b"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u0031b"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u0031b"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u0031b"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u0031b"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T7.js b/test/built-ins/RegExp/S15.10.2.7_A1_T7.js index 232afdf549..392b0b6c9d 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T7.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T7.js @@ -15,24 +15,28 @@ var __expected = ["0112"]; __expected.index = 2; __expected.input = "0a01122b"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u003122b"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u003122b"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u003122b"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u003122b"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T8.js b/test/built-ins/RegExp/S15.10.2.7_A1_T8.js index e124a1a9d0..8d7eb228ca 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T8.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T8.js @@ -15,24 +15,28 @@ var __expected = ["bbbc"]; __expected.index = 4; __expected.input = "aaabbbbcccddeeeefffff"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /b{2,3}c/.exec("aaabbbbcccddeeeefffff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /b{2,3}c/.exec("aaabbbbcccddeeeefffff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /b{2,3}c/.exec("aaabbbbcccddeeeefffff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /b{2,3}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A1_T9.js b/test/built-ins/RegExp/S15.10.2.7_A1_T9.js index 53cc23d94b..e5893f3a9e 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A1_T9.js +++ b/test/built-ins/RegExp/S15.10.2.7_A1_T9.js @@ -11,7 +11,4 @@ description: Execute /b{42,93}c/.exec("aaabbbbcccddeeeefffff") and check results var __executed = /b{42,93}c/.test("aaabbbbcccddeeeefffff"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /b{42,93}c/.test("aaabbbbcccddeeeefffff") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.7_A2_T1.js b/test/built-ins/RegExp/S15.10.2.7_A2_T1.js index 1d14e8d256..2a09a40430 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A2_T1.js +++ b/test/built-ins/RegExp/S15.10.2.7_A2_T1.js @@ -15,24 +15,28 @@ var __expected = ["box1"]; __expected.index = 5; __expected.input = "CE\uFFFFL\uFFDDbox127"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\w{3}\\d?/.exec("CE\\uFFFFL\\uFFDDbox127"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\w{3}\\d?/.exec("CE\\uFFFFL\\uFFDDbox127"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\w{3}\\d?/.exec("CE\\uFFFFL\\uFFDDbox127"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\w{3}\\d?/.exec("CE\\uFFFFL\\uFFDDbox127"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A2_T2.js b/test/built-ins/RegExp/S15.10.2.7_A2_T2.js index 2da38406df..20d6909ad7 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A2_T2.js +++ b/test/built-ins/RegExp/S15.10.2.7_A2_T2.js @@ -15,24 +15,28 @@ var __expected = ["CEL"]; __expected.index = 0; __expected.input = "CELL\uFFDDbox127"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\w{3}\\d?/.exec("CELL\\uFFDDbox127"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\w{3}\\d?/.exec("CELL\\uFFDDbox127"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\w{3}\\d?/.exec("CELL\\uFFDDbox127"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\w{3}\\d?/.exec("CELL\\uFFDDbox127"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A2_T3.js b/test/built-ins/RegExp/S15.10.2.7_A2_T3.js index 8a490f4008..435f852804 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A2_T3.js +++ b/test/built-ins/RegExp/S15.10.2.7_A2_T3.js @@ -15,24 +15,28 @@ var __expected = ["bbc"]; __expected.index = 5; __expected.input = "aaabbbbcccddeeeefffff"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A2_T4.js b/test/built-ins/RegExp/S15.10.2.7_A2_T4.js index a959300d91..7bf9e7285b 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A2_T4.js +++ b/test/built-ins/RegExp/S15.10.2.7_A2_T4.js @@ -11,7 +11,4 @@ description: Execute /b{8}c/.test("aaabbbbcccddeeeefffff") and check results var __executed = /b{8}/.test("aaabbbbcccddeeeefffff"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /b{8}/.test("aaabbbbcccddeeeefffff") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T1.js b/test/built-ins/RegExp/S15.10.2.7_A3_T1.js index a8b66cb5cf..342d077efe 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T1.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T1.js @@ -15,24 +15,28 @@ var __expected = [" java\n"]; __expected.index = 8; __expected.input = "language java\n"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\s+java\\s+/.exec("language java\\n"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\s+java\\s+/.exec("language java\\n"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\s+java\\s+/.exec("language java\\n"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\s+java\\s+/.exec("language java\\n"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T10.js b/test/built-ins/RegExp/S15.10.2.7_A3_T10.js index a8c8e1c082..eca6f7a429 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T10.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T10.js @@ -11,7 +11,4 @@ description: Execute /o+/.test("abcdefg") and check results var __executed = /o+/.test("abcdefg"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /o+/.test("abcdefg") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T11.js b/test/built-ins/RegExp/S15.10.2.7_A3_T11.js index aaee0e071e..322065f59b 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T11.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T11.js @@ -15,24 +15,28 @@ var __expected = ["d"]; __expected.index = 3; __expected.input = "abcdefg"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /d+/.exec("abcdefg"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /d+/.exec("abcdefg"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /d+/.exec("abcdefg"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /d+/.exec("abcdefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T12.js b/test/built-ins/RegExp/S15.10.2.7_A3_T12.js index 26fe5575db..b8e4045d13 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T12.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T12.js @@ -15,24 +15,28 @@ var __expected = ["bbbbbbb","bbbbb","b","b"]; __expected.index = 1; __expected.input = "abbbbbbbc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(b+)(b+)(b+)/.exec("abbbbbbbc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(b+)(b+)(b+)/.exec("abbbbbbbc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(b+)(b+)(b+)/.exec("abbbbbbbc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(b+)(b+)(b+)/.exec("abbbbbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T13.js b/test/built-ins/RegExp/S15.10.2.7_A3_T13.js index ad0fc2c0a1..e86583214e 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T13.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T13.js @@ -15,24 +15,28 @@ var __expected = ["bbbbbbb","bbbbbbb",""]; __expected.index = 1; __expected.input = "abbbbbbbc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(b+)(b*)/.exec("abbbbbbbc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(b+)(b*)/.exec("abbbbbbbc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(b+)(b*)/.exec("abbbbbbbc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(b+)(b*)/.exec("abbbbbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T14.js b/test/built-ins/RegExp/S15.10.2.7_A3_T14.js index a98f96ed7d..00c65ea70c 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T14.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T14.js @@ -15,24 +15,28 @@ var __expected = ["bbbbbbb"]; __expected.index = 1; __expected.input = "abbbbbbbc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /b*b+/.exec("abbbbbbbc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /b*b+/.exec("abbbbbbbc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /b*b+/.exec("abbbbbbbc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /b*b+/.exec("abbbbbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T2.js b/test/built-ins/RegExp/S15.10.2.7_A3_T2.js index 3ffd5722d4..64f3df564b 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T2.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T2.js @@ -15,24 +15,28 @@ var __expected = ["\t java "]; __expected.index = 0; __expected.input = "\t java object"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\s+java\\s+/.exec("\\t java object"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\s+java\\s+/.exec("\\t java object"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\s+java\\s+/.exec("\\t java object"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\s+java\\s+/.exec("\\t java object"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T3.js b/test/built-ins/RegExp/S15.10.2.7_A3_T3.js index 52a643ba2f..087358f26e 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T3.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T3.js @@ -11,7 +11,4 @@ description: Execute /\s+java\s+/.test("\t javax package") and check results var __executed = /\s+java\s+/.test("\t javax package"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /\\s+java\\s+/.test("\\t javax package") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T4.js b/test/built-ins/RegExp/S15.10.2.7_A3_T4.js index 8151b5ddda..310a32e364 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T4.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T4.js @@ -11,7 +11,4 @@ description: Execute /\s+java\s+/.test("java\n\nobject") and check results var __executed = /\s+java\s+/.test("java\n\nobject"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /\\s+java\\s+/.test("java\\n\\nobject") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T5.js b/test/built-ins/RegExp/S15.10.2.7_A3_T5.js index 61be63a924..753db742f2 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T5.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T5.js @@ -17,24 +17,28 @@ var __expected = ["x2"]; __expected.index = 10; __expected.input = "x 2 ff 55 x2 as1 z12 abc12.0"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[a-z]+\\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[a-z]+\\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[a-z]+\\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[a-z]+\\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T6.js b/test/built-ins/RegExp/S15.10.2.7_A3_T6.js index 1df080daa1..86ac01549f 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T6.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T6.js @@ -15,24 +15,28 @@ var __expected = ["abc123"]; __expected.index = 2; __expected.input = "__abc123.0"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[a-z]+\\d+/.exec("__abc123.0"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[a-z]+\\d+/.exec("__abc123.0"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[a-z]+\\d+/.exec("__abc123.0"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[a-z]+\\d+/.exec("__abc123.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T7.js b/test/built-ins/RegExp/S15.10.2.7_A3_T7.js index 75bee83204..3aa1fb841f 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T7.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T7.js @@ -17,24 +17,28 @@ var __expected = ["x2","2"]; __expected.index = 10; __expected.input = "x 2 ff 55 x2 as1 z12 abc12.0"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[a-z]+(\\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[a-z]+(\\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[a-z]+(\\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[a-z]+(\\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T8.js b/test/built-ins/RegExp/S15.10.2.7_A3_T8.js index 871f61d01b..d7bbd24c24 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T8.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T8.js @@ -15,24 +15,28 @@ var __expected = ["abc123","123"]; __expected.index = 2; __expected.input = "__abc123.0"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[a-z]+(\\d+)/.exec("__abc123.0"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[a-z]+(\\d+)/.exec("__abc123.0"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[a-z]+(\\d+)/.exec("__abc123.0"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[a-z]+(\\d+)/.exec("__abc123.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A3_T9.js b/test/built-ins/RegExp/S15.10.2.7_A3_T9.js index e3c599d667..dd7875593e 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A3_T9.js +++ b/test/built-ins/RegExp/S15.10.2.7_A3_T9.js @@ -15,24 +15,28 @@ var __expected = ["ddddd"]; __expected.index = 3; __expected.input = "abcdddddefg"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /d+/.exec("abcdddddefg"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /d+/.exec("abcdddddefg"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /d+/.exec("abcdddddefg"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /d+/.exec("abcdddddefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T1.js b/test/built-ins/RegExp/S15.10.2.7_A4_T1.js index 9a70be4a3b..db50b4e36f 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T1.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T1.js @@ -15,24 +15,28 @@ var __expected = [""]; __expected.index = 0; __expected.input = '"beast"-nickname'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^"]*/.exec(\'"beast"-nickname\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^"]*/.exec(\'"beast"-nickname\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^"]*/.exec(\'"beast"-nickname\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^"]*/.exec(\'"beast"-nickname\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T10.js b/test/built-ins/RegExp/S15.10.2.7_A4_T10.js index be158727a1..9b1fe42885 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T10.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T10.js @@ -15,24 +15,28 @@ var __expected = [""]; __expected.index = 0; __expected.input = 'abcddddefg'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /d*/.exec(\'abcddddefg\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /d*/.exec(\'abcddddefg\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /d*/.exec(\'abcddddefg\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /d*/.exec(\'abcddddefg\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T11.js b/test/built-ins/RegExp/S15.10.2.7_A4_T11.js index 7dd3e15e9d..7eee88ef16 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T11.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T11.js @@ -15,24 +15,28 @@ var __expected = ["cdddd"]; __expected.index = 2; __expected.input = 'abcddddefg'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /cd*/.exec(\'abcddddefg\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /cd*/.exec(\'abcddddefg\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /cd*/.exec(\'abcddddefg\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /cd*/.exec(\'abcddddefg\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T12.js b/test/built-ins/RegExp/S15.10.2.7_A4_T12.js index 11c8169563..131df04592 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T12.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T12.js @@ -15,24 +15,28 @@ var __expected = ["cd"]; __expected.index = 2; __expected.input = 'abcdefg'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /cx*d/.exec(\'abcdefg\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /cx*d/.exec(\'abcdefg\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /cx*d/.exec(\'abcdefg\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /cx*d/.exec(\'abcdefg\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T13.js b/test/built-ins/RegExp/S15.10.2.7_A4_T13.js index ba98d5b959..8521dcf59e 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T13.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T13.js @@ -15,24 +15,28 @@ var __expected = ["xxxxxxx","xxxxxx","x"]; __expected.index = 0; __expected.input = 'xxxxxxx'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(x*)(x+)/.exec(\'xxxxxxx\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(x*)(x+)/.exec(\'xxxxxxx\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(x*)(x+)/.exec(\'xxxxxxx\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(x*)(x+)/.exec(\'xxxxxxx\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T14.js b/test/built-ins/RegExp/S15.10.2.7_A4_T14.js index 40e5c91ac7..c58778d40b 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T14.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T14.js @@ -15,24 +15,28 @@ var __expected = ["1234567890","123456789","0"]; __expected.index = 0; __expected.input = '1234567890'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(\\d*)(\\d+)/.exec(\'1234567890\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(\\d*)(\\d+)/.exec(\'1234567890\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(\\d*)(\\d+)/.exec(\'1234567890\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(\\d*)(\\d+)/.exec(\'1234567890\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T15.js b/test/built-ins/RegExp/S15.10.2.7_A4_T15.js index 0d6c3e7223..85242811ea 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T15.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T15.js @@ -15,24 +15,28 @@ var __expected = ["1234567890","12345678","0"]; __expected.index = 0; __expected.input = '1234567890'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(\\d*)\\d(\\d+)/.exec(\'1234567890\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(\\d*)\\d(\\d+)/.exec(\'1234567890\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(\\d*)\\d(\\d+)/.exec(\'1234567890\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(\\d*)\\d(\\d+)/.exec(\'1234567890\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T16.js b/test/built-ins/RegExp/S15.10.2.7_A4_T16.js index 40dd92c0e7..d3e3b4ccec 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T16.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T16.js @@ -15,24 +15,28 @@ var __expected = ["xxxxxxx","xxxxxxx",""]; __expected.index = 0; __expected.input = 'xxxxxxx'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(x+)(x*)/.exec(\'xxxxxxx\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(x+)(x*)/.exec(\'xxxxxxx\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(x+)(x*)/.exec(\'xxxxxxx\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(x+)(x*)/.exec(\'xxxxxxx\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T17.js b/test/built-ins/RegExp/S15.10.2.7_A4_T17.js index ce7c02a07a..3cc4ca7613 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T17.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T17.js @@ -15,24 +15,28 @@ var __expected = ["xxxxxxyyyyyy"]; __expected.index = 0; __expected.input = 'xxxxxxyyyyyy'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /x*y+$/.exec(\'xxxxxxyyyyyy\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /x*y+$/.exec(\'xxxxxxyyyyyy\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /x*y+$/.exec(\'xxxxxxyyyyyy\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /x*y+$/.exec(\'xxxxxxyyyyyy\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T18.js b/test/built-ins/RegExp/S15.10.2.7_A4_T18.js index 96040b68e7..749dc90c65 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T18.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T18.js @@ -15,24 +15,28 @@ var __expected = ["bcd"]; __expected.index = 1; __expected.input = 'abcdef'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[\\d]*[\\s]*bc./.exec(\'abcdef\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[\\d]*[\\s]*bc./.exec(\'abcdef\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[\\d]*[\\s]*bc./.exec(\'abcdef\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[\\d]*[\\s]*bc./.exec(\'abcdef\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T19.js b/test/built-ins/RegExp/S15.10.2.7_A4_T19.js index 921346cd5a..028e07d44f 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T19.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T19.js @@ -15,24 +15,28 @@ var __expected = ["bcde"]; __expected.index = 1; __expected.input = 'abcdef'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /bc..[\\d]*[\\s]*/.exec(\'abcdef\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /bc..[\\d]*[\\s]*/.exec(\'abcdef\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /bc..[\\d]*[\\s]*/.exec(\'abcdef\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /bc..[\\d]*[\\s]*/.exec(\'abcdef\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T2.js b/test/built-ins/RegExp/S15.10.2.7_A4_T2.js index bfee314678..baff8315ad 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T2.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T2.js @@ -15,24 +15,28 @@ var __expected = ["alice said: "]; __expected.index = 0; __expected.input = 'alice said: "don\'t"'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^"]*/.exec(\'alice said: "don\'t"\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^"]*/.exec(\'alice said: "don\'t"\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^"]*/.exec(\'alice said: "don\'t"\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^"]*/.exec(\'alice said: "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T20.js b/test/built-ins/RegExp/S15.10.2.7_A4_T20.js index d81da4dc00..a7feda6881 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T20.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T20.js @@ -15,24 +15,28 @@ var __expected = ["a1b2c3"]; __expected.index = 0; __expected.input = 'a1b2c3'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /.*/.exec(\'a1b2c3\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /.*/.exec(\'a1b2c3\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /.*/.exec(\'a1b2c3\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /.*/.exec(\'a1b2c3\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T21.js b/test/built-ins/RegExp/S15.10.2.7_A4_T21.js index 5652a76410..9ff1313201 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T21.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T21.js @@ -11,7 +11,4 @@ description: Execute /[xyz]*1/.test('a0.b2.c3') and check results var __executed = /[xyz]*1/.test('a0.b2.c3'); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /[xyz]*1/.test(\'a0.b2.c3\') === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T3.js b/test/built-ins/RegExp/S15.10.2.7_A4_T3.js index fbb4222e08..7461bd1a43 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T3.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T3.js @@ -15,24 +15,28 @@ var __expected = ["before\'i\'start"]; __expected.index = 0; __expected.input = "before\'i\'start"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^"]*/.exec("before\'i\'start"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^"]*/.exec("before\'i\'start"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^"]*/.exec("before\'i\'start"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^"]*/.exec("before\'i\'start"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T4.js b/test/built-ins/RegExp/S15.10.2.7_A4_T4.js index a4b1c78ca3..c767a8df9c 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T4.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T4.js @@ -17,24 +17,28 @@ var __expected = ["alice "]; __expected.index = 0; __expected.input = 'alice \"sweep\": "don\'t"'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^"]*/.exec(\'alice \\"sweep\\": "don\'t"\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^"]*/.exec(\'alice \\"sweep\\": "don\'t"\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^"]*/.exec(\'alice \\"sweep\\": "don\'t"\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^"]*/.exec(\'alice \\"sweep\\": "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T5.js b/test/built-ins/RegExp/S15.10.2.7_A4_T5.js index 3da9a13b9d..5e762fa8ae 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T5.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T5.js @@ -17,24 +17,28 @@ var __expected = ["alice "]; __expected.index = 0; __expected.input = 'alice "sweep": "don\'t"'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[^"]*/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[^"]*/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[^"]*/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[^"]*/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T6.js b/test/built-ins/RegExp/S15.10.2.7_A4_T6.js index 646423fd38..dd44642fbf 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T6.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T6.js @@ -17,24 +17,28 @@ var __expected = ["\"sweep\""]; __expected.index = 6; __expected.input = 'alice "sweep": "don\'t"'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /["\'][^"\']*["\']/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /["\'][^"\']*["\']/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /["\'][^"\']*["\']/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /["\'][^"\']*["\']/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T7.js b/test/built-ins/RegExp/S15.10.2.7_A4_T7.js index 3add3401fa..5dec38221f 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T7.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T7.js @@ -17,24 +17,28 @@ var __expected = ["\'don\'"]; __expected.index = 17; __expected.input = 'alice cries out: \'don\'t\''; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out: \'don\'t\'\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out: \'don\'t\'\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out: \'don\'t\'\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out: \'don\'t\'\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T8.js b/test/built-ins/RegExp/S15.10.2.7_A4_T8.js index 120446fd3f..12499974f9 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T8.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T8.js @@ -13,7 +13,4 @@ description: > var __executed = /["'][^"']*["']/.test('alice cries out: don\'t'); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /["\'][^"\']*["\']/.test(\'alice cries out: don\'t\') === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.7_A4_T9.js b/test/built-ins/RegExp/S15.10.2.7_A4_T9.js index 35b8704c00..8fd921196a 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A4_T9.js +++ b/test/built-ins/RegExp/S15.10.2.7_A4_T9.js @@ -17,24 +17,28 @@ var __expected = ['\"\"']; __expected.index = 16; __expected.input = 'alice cries out:\"\"'; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out:\\"\\"\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out:\\"\\"\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out:\\"\\"\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out:\\"\\"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T1.js b/test/built-ins/RegExp/S15.10.2.7_A5_T1.js index 5a048d0b85..9163b76d2e 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T1.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T1.js @@ -17,24 +17,28 @@ var __expected = ["javascript", "script"]; __expected.index = 7; __expected.input = "state: javascript is extension of ecma script"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /java(script)?/.exec("state: javascript is extension of ecma script"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /java(script)?/.exec("state: javascript is extension of ecma script"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /java(script)?/.exec("state: javascript is extension of ecma script"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /java(script)?/.exec("state: javascript is extension of ecma script"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T10.js b/test/built-ins/RegExp/S15.10.2.7_A5_T10.js index 58443c810b..2de3932a8a 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T10.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T10.js @@ -15,24 +15,28 @@ var __expected = ["az"]; __expected.index = 3; __expected.input = "123az789"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /ab?c?d?x?y?z/.exec("123az789"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /ab?c?d?x?y?z/.exec("123az789"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /ab?c?d?x?y?z/.exec("123az789"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /ab?c?d?x?y?z/.exec("123az789"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T11.js b/test/built-ins/RegExp/S15.10.2.7_A5_T11.js index c345c402af..0ea99d51ca 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T11.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T11.js @@ -15,24 +15,28 @@ var __expected = ["?????"]; __expected.index = 0; __expected.input = "?????"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\??\\??\\??\\??\\??/.exec("?????"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\??\\??\\??\\??\\??/.exec("?????"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\??\\??\\??\\??\\??/.exec("?????"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\??\\??\\??\\??\\??/.exec("?????"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T12.js b/test/built-ins/RegExp/S15.10.2.7_A5_T12.js index 7ee959e892..4f00e08673 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T12.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T12.js @@ -15,24 +15,28 @@ var __expected = ["test"]; __expected.index = 0; __expected.input = "test"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /.?.?.?.?.?.?.?/.exec("test"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /.?.?.?.?.?.?.?/.exec("test"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /.?.?.?.?.?.?.?/.exec("test"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /.?.?.?.?.?.?.?/.exec("test"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T2.js b/test/built-ins/RegExp/S15.10.2.7_A5_T2.js index afd4f76e55..56d773802e 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T2.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T2.js @@ -17,24 +17,28 @@ var __expected = ["java", undefined]; __expected.index = 7; __expected.input = "state: java and javascript are vastly different"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /java(script)?/.exec("state: java and javascript are vastly different"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /java(script)?/.exec("state: java and javascript are vastly different"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /java(script)?/.exec("state: java and javascript are vastly different"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /java(script)?/.exec("state: java and javascript are vastly different"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T3.js b/test/built-ins/RegExp/S15.10.2.7_A5_T3.js index 5014783bdb..5ccbe55b35 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T3.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T3.js @@ -13,7 +13,4 @@ description: > var __executed = /java(script)?/.test("state: both Java and JavaScript used in web development"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /java(script)?/.test("state: both Java and JavaScript used in web development") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T4.js b/test/built-ins/RegExp/S15.10.2.7_A5_T4.js index b15a2ad8ff..58396ec6e1 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T4.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T4.js @@ -15,24 +15,28 @@ var __expected = ["cde"]; __expected.index = 2; __expected.input = "abcdef"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /cd?e/.exec("abcdef"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /cd?e/.exec("abcdef"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /cd?e/.exec("abcdef"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /cd?e/.exec("abcdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T5.js b/test/built-ins/RegExp/S15.10.2.7_A5_T5.js index d593948912..308e7458b9 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T5.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T5.js @@ -15,24 +15,28 @@ var __expected = ["cde"]; __expected.index = 2; __expected.input = "abcdef"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /cdx?e/.exec("abcdef"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /cdx?e/.exec("abcdef"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /cdx?e/.exec("abcdef"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /cdx?e/.exec("abcdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T6.js b/test/built-ins/RegExp/S15.10.2.7_A5_T6.js index 06a028d741..0f7434c7b8 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T6.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T6.js @@ -15,24 +15,28 @@ var __expected = ["pqrst"]; __expected.index = 0; __expected.input = "pqrstuvw"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /o?pqrst/.exec("pqrstuvw"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /o?pqrst/.exec("pqrstuvw"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /o?pqrst/.exec("pqrstuvw"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /o?pqrst/.exec("pqrstuvw"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T7.js b/test/built-ins/RegExp/S15.10.2.7_A5_T7.js index 0676a2d2f1..4ff5b37c8b 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T7.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T7.js @@ -15,24 +15,28 @@ var __expected = [""]; __expected.index = 0; __expected.input = "abcd"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /x?y?z?/.exec("abcd"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /x?y?z?/.exec("abcd"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /x?y?z?/.exec("abcd"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /x?y?z?/.exec("abcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T8.js b/test/built-ins/RegExp/S15.10.2.7_A5_T8.js index 5b27963148..d99aa9be64 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T8.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T8.js @@ -15,24 +15,28 @@ var __expected = ["abc"]; __expected.index = 0; __expected.input = "abcd"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /x?ay?bz?c/.exec("abcd"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /x?ay?bz?c/.exec("abcd"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /x?ay?bz?c/.exec("abcd"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /x?ay?bz?c/.exec("abcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A5_T9.js b/test/built-ins/RegExp/S15.10.2.7_A5_T9.js index 912d48fb22..2944dfe41b 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A5_T9.js +++ b/test/built-ins/RegExp/S15.10.2.7_A5_T9.js @@ -15,24 +15,28 @@ var __expected = ["bbbb"]; __expected.index = 1; __expected.input = "abbbbc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /b?b?b?b/.exec("abbbbc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /b?b?b?b/.exec("abbbbc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /b?b?b?b/.exec("abbbbc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /b?b?b?b/.exec("abbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A6_T1.js b/test/built-ins/RegExp/S15.10.2.7_A6_T1.js index 53f7ab043d..e69ed4f74e 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A6_T1.js +++ b/test/built-ins/RegExp/S15.10.2.7_A6_T1.js @@ -16,24 +16,28 @@ var __expected = ["bbbbc"]; __expected.index = 3; __expected.input = "aaabbbbcccddeeeefffff"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /b{2,}c/.exec("aaabbbbcccddeeeefffff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /b{2,}c/.exec("aaabbbbcccddeeeefffff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /b{2,}c/.exec("aaabbbbcccddeeeefffff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /b{2,}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A6_T2.js b/test/built-ins/RegExp/S15.10.2.7_A6_T2.js index 4448aaed2f..156844f3b4 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A6_T2.js +++ b/test/built-ins/RegExp/S15.10.2.7_A6_T2.js @@ -12,7 +12,4 @@ description: Execute /b{8,}c/.test("aaabbbbcccddeeeefffff") and check results var __executed = /b{8,}c/.test("aaabbbbcccddeeeefffff"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /b{8,}c/.test("aaabbbbcccddeeeefffff") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.7_A6_T3.js b/test/built-ins/RegExp/S15.10.2.7_A6_T3.js index f83870be1c..02e6007baf 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A6_T3.js +++ b/test/built-ins/RegExp/S15.10.2.7_A6_T3.js @@ -16,24 +16,28 @@ var __expected = ["456646"]; __expected.index = 3; __expected.input = "wqe456646dsff"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\d{1,}/.exec("wqe456646dsff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\d{1,}/.exec("wqe456646dsff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\d{1,}/.exec("wqe456646dsff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\d{1,}/.exec("wqe456646dsff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A6_T4.js b/test/built-ins/RegExp/S15.10.2.7_A6_T4.js index b172999e08..a3eb280216 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A6_T4.js +++ b/test/built-ins/RegExp/S15.10.2.7_A6_T4.js @@ -16,24 +16,28 @@ var __expected = ["123123","123"]; __expected.index = 0; __expected.input = "123123"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(123){1,}/.exec("123123"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(123){1,}/.exec("123123"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(123){1,}/.exec("123123"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(123){1,}/.exec("123123"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A6_T5.js b/test/built-ins/RegExp/S15.10.2.7_A6_T5.js index e02b660ef0..b034b928ed 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A6_T5.js +++ b/test/built-ins/RegExp/S15.10.2.7_A6_T5.js @@ -16,24 +16,28 @@ var __expected = ["123123x123","123"]; __expected.index = 0; __expected.input = "123123x123"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(123){1,}x\\1/.exec("123123x123"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(123){1,}x\\1/.exec("123123x123"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(123){1,}x\\1\\/.exec("123123x123"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(123){1,}x\\1/.exec("123123x123"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.7_A6_T6.js b/test/built-ins/RegExp/S15.10.2.7_A6_T6.js index 61f282c3e9..19f2dc3aa0 100644 --- a/test/built-ins/RegExp/S15.10.2.7_A6_T6.js +++ b/test/built-ins/RegExp/S15.10.2.7_A6_T6.js @@ -16,24 +16,28 @@ var __expected = ["xxxxxxx"]; __expected.index = 0; __expected.input = "xxxxxxx"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /x{1,2}x{1,}/.exec("xxxxxxx"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /x{1,2}x{1,}/.exec("xxxxxxx"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /x{1,2}x{1,}/.exec("xxxxxxx"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /x{1,2}x{1,}/.exec("xxxxxxx"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A1_T1.js b/test/built-ins/RegExp/S15.10.2.8_A1_T1.js index 84c1a8640e..e05710e076 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.8_A1_T1.js @@ -16,24 +16,28 @@ var __expected = ["", "aaa"]; __expected.index = 1; __expected.input = "baaabac"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(?=(a+))/.exec("baaabac"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(?=(a+))/.exec("baaabac"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(?=(a+))/.exec("baaabac"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(?=(a+))/.exec("baaabac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A1_T2.js b/test/built-ins/RegExp/S15.10.2.8_A1_T2.js index 5866f825ce..143c8eb911 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.2.8_A1_T2.js @@ -16,24 +16,28 @@ var __expected = ["aba", "a"]; __expected.index = 3; __expected.input = "baaabac"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(?=(a+))a*b\\1/.exec("baaabac"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(?=(a+))a*b\\1/.exec("baaabac"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(?=(a+))a*b\\1/.exec("baaabac"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(?=(a+))a*b\\1/.exec("baaabac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A1_T3.js b/test/built-ins/RegExp/S15.10.2.8_A1_T3.js index 7b166606a8..eb6fc357fb 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A1_T3.js +++ b/test/built-ins/RegExp/S15.10.2.8_A1_T3.js @@ -18,24 +18,28 @@ var __expected = ["Javascript", "script"]; __expected.index = 5; __expected.input = "just Javascript: the way af jedi"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec("just Javascript: the way af jedi"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec("just Javascript: the way af jedi"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec("just Javascript: the way af jedi"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec("just Javascript: the way af jedi"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A1_T4.js b/test/built-ins/RegExp/S15.10.2.8_A1_T4.js index 8f020dbc29..747045ff3e 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A1_T4.js +++ b/test/built-ins/RegExp/S15.10.2.8_A1_T4.js @@ -18,24 +18,28 @@ var __expected = ["java", undefined]; __expected.index = 9; __expected.input = "taste of java: the cookbook "; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec("taste of java: the cookbook "); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec("taste of java: the cookbook "); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec("taste of java: the cookbook "); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec("taste of java: the cookbook "); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A1_T5.js b/test/built-ins/RegExp/S15.10.2.8_A1_T5.js index e259a5ac73..6f0b7e1b63 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.2.8_A1_T5.js @@ -14,7 +14,4 @@ description: > var __executed = /[Jj]ava([Ss]cript)?(?=\:)/.test("rhino is JavaScript engine"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /[Jj]ava([Ss]cript)?(?=\\:)/.test("rhino is JavaScript engine") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.8_A2_T1.js b/test/built-ins/RegExp/S15.10.2.8_A2_T1.js index e70a45692e..b2d2e470a0 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A2_T1.js +++ b/test/built-ins/RegExp/S15.10.2.8_A2_T1.js @@ -18,24 +18,28 @@ var __expected = ["baaabaac", "ba", undefined, "abaac"]; __expected.index = 0; __expected.input = "baaabaac"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(.*?)a(?!(a+)b\\2c)\\2(.*)/.exec("baaabaac"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(.*?)a(?!(a+)b\\2c)\\2(.*)/.exec("baaabaac"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(.*?)a(?!(a+)b\\2c)\\2(.*)/.exec("baaabaac"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(.*?)a(?!(a+)b\\2c)\\2(.*)/.exec("baaabaac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A2_T10.js b/test/built-ins/RegExp/S15.10.2.8_A2_T10.js index fa70b2c302..480d1f4f55 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A2_T10.js +++ b/test/built-ins/RegExp/S15.10.2.8_A2_T10.js @@ -16,24 +16,28 @@ var __expected = [""]; __expected.index = 1; __expected.input = "bc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(?!a|b)|c/.exec("bc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(?!a|b)|c/.exec("bc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(?!a|b)|c/.exec("bc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(?!a|b)|c/.exec("bc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A2_T11.js b/test/built-ins/RegExp/S15.10.2.8_A2_T11.js index 2d61c42c7e..b7700f69d6 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A2_T11.js +++ b/test/built-ins/RegExp/S15.10.2.8_A2_T11.js @@ -16,24 +16,28 @@ var __expected = [""]; __expected.index = 0; __expected.input = "d"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(?!a|b)|c/.exec("d"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(?!a|b)|c/.exec("d"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(?!a|b)|c/.exec("d"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(?!a|b)|c/.exec("d"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A2_T2.js b/test/built-ins/RegExp/S15.10.2.8_A2_T2.js index a0d32bac69..0b3a23bd9e 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A2_T2.js +++ b/test/built-ins/RegExp/S15.10.2.8_A2_T2.js @@ -18,24 +18,28 @@ var __expected = ["JavaBeans", "Beans"]; __expected.index = 9; __expected.input = "using of JavaBeans technology"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /Java(?!Script)([A-Z]\\w*)/.exec("using of JavaBeans technology"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /Java(?!Script)([A-Z]\\w*)/.exec("using of JavaBeans technology"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /Java(?!Script)([A-Z]\\w*)/.exec("using of JavaBeans technology"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /Java(?!Script)([A-Z]\\w*)/.exec("using of JavaBeans technology"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A2_T3.js b/test/built-ins/RegExp/S15.10.2.8_A2_T3.js index 9ed52b4f67..bcea026267 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A2_T3.js +++ b/test/built-ins/RegExp/S15.10.2.8_A2_T3.js @@ -14,7 +14,4 @@ description: > var __executed = /Java(?!Script)([A-Z]\w*)/.test("using of Java language"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /Java(?!Script)([A-Z]\\w*)/.test("using of Java language") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.8_A2_T4.js b/test/built-ins/RegExp/S15.10.2.8_A2_T4.js index 87f3898465..507883069a 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A2_T4.js +++ b/test/built-ins/RegExp/S15.10.2.8_A2_T4.js @@ -14,7 +14,4 @@ description: > var __executed = /Java(?!Script)([A-Z]\w*)/.test("i'm a JavaScripter "); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /Java(?!Script)([A-Z]\\w*)/.test("i\'m a JavaScripter ") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.8_A2_T5.js b/test/built-ins/RegExp/S15.10.2.8_A2_T5.js index 2e16e5ca6d..daf166150e 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A2_T5.js +++ b/test/built-ins/RegExp/S15.10.2.8_A2_T5.js @@ -18,24 +18,28 @@ var __expected = ["JavaScr", "Scr"]; __expected.index = 0; __expected.input = "JavaScr oops ipt "; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /Java(?!Script)([A-Z]\\w*)/.exec("JavaScr oops ipt "); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /Java(?!Script)([A-Z]\\w*)/.exec("JavaScr oops ipt "); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /Java(?!Script)([A-Z]\\w*)/.exec("JavaScr oops ipt "); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /Java(?!Script)([A-Z]\\w*)/.exec("JavaScr oops ipt "); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A2_T6.js b/test/built-ins/RegExp/S15.10.2.8_A2_T6.js index d04a17ecb6..563c2b4c1f 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A2_T6.js +++ b/test/built-ins/RegExp/S15.10.2.8_A2_T6.js @@ -16,24 +16,28 @@ var __expected = ['.', '.']; __expected.index = 2; __expected.input = "ah.info"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(\\.(?!com|org)|\\/)/.exec("ah.info"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(\\.(?!com|org)|\\/)/.exec("ah.info"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(\\.(?!com|org)|\\/)/.exec("ah.info"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(\\.(?!com|org)|\\/)/.exec("ah.info"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A2_T7.js b/test/built-ins/RegExp/S15.10.2.8_A2_T7.js index 5c47ae3b6e..d8c517cb97 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A2_T7.js +++ b/test/built-ins/RegExp/S15.10.2.8_A2_T7.js @@ -16,24 +16,28 @@ var __expected = ['/', '/']; __expected.index = 2; __expected.input = "ah/info"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(\\.(?!com|org)|\\/)/.exec("ah/info"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(\\.(?!com|org)|\\/)/.exec("ah/info"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(\\.(?!com|org)|\\/)/.exec("ah/info"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(\\.(?!com|org)|\\/)/.exec("ah/info"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A2_T8.js b/test/built-ins/RegExp/S15.10.2.8_A2_T8.js index 056e89ef7d..6834639ca0 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A2_T8.js +++ b/test/built-ins/RegExp/S15.10.2.8_A2_T8.js @@ -12,7 +12,4 @@ description: Execute /(\.(?!com|org)|\/)/.test("ah.com") and check results var __executed = /(\.(?!com|org)|\/)/.test("ah.com"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /(\\.(?!com|org)|\\/)/.test("ah.com") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.8_A2_T9.js b/test/built-ins/RegExp/S15.10.2.8_A2_T9.js index 363a71fb11..5848126501 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A2_T9.js +++ b/test/built-ins/RegExp/S15.10.2.8_A2_T9.js @@ -16,24 +16,28 @@ var __expected = [""]; __expected.index = 0; __expected.input = ""; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(?!a|b)|c/.exec(""); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(?!a|b)|c/.exec(""); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(?!a|b)|c/.exec(""); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(?!a|b)|c/.exec(""); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T1.js b/test/built-ins/RegExp/S15.10.2.8_A3_T1.js index 6b644d2e24..2e52fd59fe 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T1.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T1.js @@ -19,24 +19,28 @@ var __expected = ["javaScript is funny","javaScript","Script","funny"]; __expected.index = 9; __expected.input = "Learning javaScript is funny, really"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec("Learning javaScript is funny, really"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec("Learning javaScript is funny, really"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec("Learning javaScript is funny, really"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec("Learning javaScript is funny, really"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T10.js b/test/built-ins/RegExp/S15.10.2.8_A3_T10.js index 7d23272dd3..ecea63ec44 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T10.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T10.js @@ -17,24 +17,28 @@ var __expected = ["123456123456","123","456"]; __expected.index = 0; __expected.input = "123456123456"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(\\d{3})(\\d{3})\\1\\2/.exec("123456123456"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(\\d{3})(\\d{3})\\1\\2/.exec("123456123456"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(\\d{3})(\\d{3})\\1\\2/.exec("123456123456"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(\\d{3})(\\d{3})\\1\\2/.exec("123456123456"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T11.js b/test/built-ins/RegExp/S15.10.2.8_A3_T11.js index 914cffa2d5..4ecbefd597 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T11.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T11.js @@ -17,24 +17,28 @@ var __expected = ["abcdefg","bcdefg","de"]; __expected.index = 0; __expected.input = "abcdefgh"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a(..(..)..)/.exec("abcdefgh"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a(..(..)..)/.exec("abcdefgh"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a(..(..)..)/.exec("abcdefgh"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a(..(..)..)/.exec("abcdefgh"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T12.js b/test/built-ins/RegExp/S15.10.2.8_A3_T12.js index 5db7a888ce..f5067e9061 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T12.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T12.js @@ -17,24 +17,28 @@ var __expected = ["abcdef","abc","bc","c","def","ef","f"]; __expected.index = 1; __expected.input = "xabcdefg"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(a(b(c)))(d(e(f)))/.exec("xabcdefg"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(a(b(c)))(d(e(f)))/.exec("xabcdefg"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(a(b(c)))(d(e(f)))/.exec("xabcdefg"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(a(b(c)))(d(e(f)))/.exec("xabcdefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T13.js b/test/built-ins/RegExp/S15.10.2.8_A3_T13.js index 52e1a09858..7978c8ac04 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T13.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T13.js @@ -19,24 +19,28 @@ var __expected = ["abcdefbcef","abc","bc","c","def","ef","f"]; __expected.index = 1; __expected.input = "xabcdefbcefg"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(a(b(c)))(d(e(f)))\\2\\5/.exec("xabcdefbcefg"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(a(b(c)))(d(e(f)))\\2\\5/.exec("xabcdefbcefg"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(a(b(c)))(d(e(f)))\\2\\5/.exec("xabcdefbcefg"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(a(b(c)))(d(e(f)))\\2\\5/.exec("xabcdefbcefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T14.js b/test/built-ins/RegExp/S15.10.2.8_A3_T14.js index 0ea6acbe73..3e93639101 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T14.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T14.js @@ -17,24 +17,28 @@ var __expected = ["abcd",""]; __expected.index = 0; __expected.input = "abcd"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a(.?)b\\1c\\1d\\1/.exec("abcd"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a(.?)b\\1c\\1d\\1/.exec("abcd"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a(.?)b\\1c\\1d\\1/.exec("abcd"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a(.?)b\\1c\\1d\\1/.exec("abcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T15.js b/test/built-ins/RegExp/S15.10.2.8_A3_T15.js index 49f3d67979..8fc1c2e741 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T15.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T15.js @@ -16,15 +16,15 @@ var __openParen = '('; var __closeParen = ')'; var __pattern = ''; var numParens = 200; - + for (var i=0; iKibology for all

\n

All for Kibology

\n' __expected.index = 7; __expected.input = __html; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /((.*\\n?)*?)<\\/body>/i.exec(__html); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /((.*\\n?)*?)<\\/body>/i.exec(__html); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /((.*\\n?)*?)<\\/body>/i.exec(__html); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /((.*\\n?)*?)<\\/body>/i.exec(__html); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T18.js b/test/built-ins/RegExp/S15.10.2.8_A3_T18.js index 75db65b1de..907c3b6a0c 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T18.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T18.js @@ -15,7 +15,4 @@ var __replaced = "To sign up click |here|https:www.xxxx.org/subscribe.htm|".repl var __expected = 'To sign up click here'; -//CHECK#1 -if (__replaced !== __expected) { - throw new Test262Error('#1: __replaced = "To sign up click |here|https:www.xxxx.org/subscribe.htm|".replace(/(\\|)([\\w\\x81-\\xff ]*)(\\|)([\\/a-z][\\w:\\/\\.]*\\.[a-z]{3,4})(\\|)/ig, \'$2\'); __replaced === ' + __expected + '. Actual: ' + __replaced); -} +assert.sameValue(__replaced, __expected, 'The value of __replaced is expected to equal the value of __expected'); diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T19.js b/test/built-ins/RegExp/S15.10.2.8_A3_T19.js index 61b709b38b..33d5b7bcc9 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T19.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T19.js @@ -19,24 +19,28 @@ var __expected = ["Course_Creator = Test","Course_Creator",undefined]; __expected.index = 0; __expected.input = "Course_Creator = Test"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /([\\S]+([ \\t]+[\\S]+)*)[ \\t]*=[ \\t]*[\\S]+/.exec("Course_Creator = Test"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /([\\S]+([ \\t]+[\\S]+)*)[ \\t]*=[ \\t]*[\\S]+/.exec("Course_Creator = Test"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /([\\S]+([ \\t]+[\\S]+)*)[ \\t]*=[ \\t]*[\\S]+/.exec("Course_Creator = Test"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /([\\S]+([ \\t]+[\\S]+)*)[ \\t]*=[ \\t]*[\\S]+/.exec("Course_Creator = Test"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T2.js b/test/built-ins/RegExp/S15.10.2.8_A3_T2.js index 757f20fc6b..a7c007202d 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T2.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T2.js @@ -19,24 +19,28 @@ var __expected = ["Java is fun","Java",undefined,"fun"]; __expected.index = 16; __expected.input = "Developing with Java is fun, try it"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec("Developing with Java is fun, try it"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec("Developing with Java is fun, try it"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec("Developing with Java is fun, try it"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec("Developing with Java is fun, try it"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T20.js b/test/built-ins/RegExp/S15.10.2.8_A3_T20.js index a1251ccca5..12b05bf21e 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T20.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T20.js @@ -17,24 +17,28 @@ var __expected = ["AAA","A","AA"]; __expected.index = 0; __expected.input = "AAA"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^(A)?(A.*)$/.exec("AAA"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^(A)?(A.*)$/.exec("AAA"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^(A)?(A.*)$/.exec("AAA"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^(A)?(A.*)$/.exec("AAA"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T21.js b/test/built-ins/RegExp/S15.10.2.8_A3_T21.js index a6385f5c57..2eb0b4eac8 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T21.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T21.js @@ -17,24 +17,28 @@ var __expected = ["AA","A","A"]; __expected.index = 0; __expected.input = "AA"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^(A)?(A.*)$/.exec("AA"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^(A)?(A.*)$/.exec("AA"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^(A)?(A.*)$/.exec("AA"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^(A)?(A.*)$/.exec("AA"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T22.js b/test/built-ins/RegExp/S15.10.2.8_A3_T22.js index e3b55b6ab3..37b76ebf38 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T22.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T22.js @@ -17,24 +17,28 @@ var __expected = ["A",undefined,"A"]; __expected.index = 0; __expected.input = "A"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /^(A)?(A.*)$/.exec("A"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /^(A)?(A.*)$/.exec("A"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /^(A)?(A.*)$/.exec("A"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /^(A)?(A.*)$/.exec("A"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T23.js b/test/built-ins/RegExp/S15.10.2.8_A3_T23.js index 49dfd6a592..884c4637c7 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T23.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T23.js @@ -21,24 +21,28 @@ var __expected = ["AAAaaAAaaaf;lrlrzs","A","AAaaAAaaaf;lrlrzs"]; __expected.index = 13; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "zxcasd;fl\\\ ^AAAaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "zxcasd;fl\\\ ^AAAaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "zxcasd;fl\\\ ^AAAaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "zxcasd;fl\\\ ^AAAaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T24.js b/test/built-ins/RegExp/S15.10.2.8_A3_T24.js index c255b6e00e..2d36ca4773 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T24.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T24.js @@ -21,24 +21,28 @@ var __expected = ["AAaaAAaaaf;lrlrzs","A","AaaAAaaaf;lrlrzs"]; __expected.index = 13; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "zxcasd;fl\\\ ^AAaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "zxcasd;fl\\\ ^AAaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "zxcasd;fl\\\ ^AAaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "zxcasd;fl\\\ ^AAaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T25.js b/test/built-ins/RegExp/S15.10.2.8_A3_T25.js index 50c3a23093..69f8256fe4 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T25.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T25.js @@ -21,24 +21,28 @@ var __expected = ["AaaAAaaaf;lrlrzs",undefined,"AaaAAaaaf;lrlrzs"]; __expected.index = 13; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "zxcasd;fl\\\ ^AaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "zxcasd;fl\\\ ^AaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "zxcasd;fl\\\ ^AaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "zxcasd;fl\\\ ^AaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T26.js b/test/built-ins/RegExp/S15.10.2.8_A3_T26.js index 5a5091f901..880ef41ba0 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T26.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T26.js @@ -19,24 +19,28 @@ var __expected = ["a",undefined]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "a"; __executed = /(a)?a/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "a"; __executed = /(a)?a/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "a"; __executed = /(a)?a/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "a"; __executed = /(a)?a/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T27.js b/test/built-ins/RegExp/S15.10.2.8_A3_T27.js index 2d1cca6bc2..b57b3105dc 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T27.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T27.js @@ -19,24 +19,28 @@ var __expected = ["a",undefined]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "a"; __executed = /a|(b)/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "a"; __executed = /a|(b)/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "a"; __executed = /a|(b)/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "a"; __executed = /a|(b)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T28.js b/test/built-ins/RegExp/S15.10.2.8_A3_T28.js index 2c1c221770..4f6a6e26d1 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T28.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T28.js @@ -19,24 +19,28 @@ var __expected = ['a', undefined, 'a']; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "a"; __executed = /(a)?(a)/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "a"; __executed = /(a)?(a)/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "a"; __executed = /(a)?(a)/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "a"; __executed = /(a)?(a)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T29.js b/test/built-ins/RegExp/S15.10.2.8_A3_T29.js index 4ac349fad7..01c2fde62e 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T29.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T29.js @@ -19,24 +19,28 @@ var __expected = ['a', undefined]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "a"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "a"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "a"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "a"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T3.js b/test/built-ins/RegExp/S15.10.2.8_A3_T3.js index a76a6e04af..ce856053af 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T3.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T3.js @@ -16,7 +16,4 @@ description: > var __executed = /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.test("Developing with JavaScript is dangerous, do not try it without assistance"); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.test("Developing with JavaScript is dangerous, do not try it without assistance") === false'); -} +assert(!__executed, 'The value of !__executed is expected to be true'); diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T30.js b/test/built-ins/RegExp/S15.10.2.8_A3_T30.js index 9cc90bedcc..3f79c7fda2 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T30.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T30.js @@ -19,24 +19,28 @@ var __expected = ['ab', "a"]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "ab"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "ab"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "ab"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "ab"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T31.js b/test/built-ins/RegExp/S15.10.2.8_A3_T31.js index fea072ab52..ee3390f904 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T31.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T31.js @@ -19,24 +19,28 @@ var __expected = ['abc', "ab"]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "abc"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "abc"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "abc"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "abc"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T32.js b/test/built-ins/RegExp/S15.10.2.8_A3_T32.js index c266fe6bc1..6d7965ec6f 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T32.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T32.js @@ -19,24 +19,28 @@ var __expected = ['www.netscape.com', 'netscape.', 'netscap']; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "www.netscape.com"; __executed = /^(([a-z]+)*[a-z]\\.)+[a-z]{2,}$/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "www.netscape.com"; __executed = /^(([a-z]+)*[a-z]\\.)+[a-z]{2,}$/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "www.netscape.com"; __executed = /^(([a-z]+)*[a-z]\\.)+[a-z]{2,}$/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "www.netscape.com"; __executed = /^(([a-z]+)*[a-z]\\.)+[a-z]{2,}$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T33.js b/test/built-ins/RegExp/S15.10.2.8_A3_T33.js index 89700b7b34..69da65cc9b 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T33.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T33.js @@ -19,24 +19,28 @@ var __expected = ['www.netscape.com', 'netscape.', 'netscap', 'e']; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "www.netscape.com"; __executed = /^(([a-z]+)*([a-z])\\.)+[a-z]{2,}$/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "www.netscape.com"; __executed = /^(([a-z]+)*([a-z])\\.)+[a-z]{2,}$/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "www.netscape.com"; __executed = /^(([a-z]+)*([a-z])\\.)+[a-z]{2,}$/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "www.netscape.com"; __executed = /^(([a-z]+)*([a-z])\\.)+[a-z]{2,}$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T4.js b/test/built-ins/RegExp/S15.10.2.8_A3_T4.js index 92765c2f0b..022165bdf7 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T4.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T4.js @@ -17,24 +17,28 @@ var __expected = ["abc","abc"]; __expected.index = 0; __expected.input = "abc"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(abc)/.exec("abc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(abc)/.exec("abc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(abc)/.exec("abc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(abc)/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T5.js b/test/built-ins/RegExp/S15.10.2.8_A3_T5.js index 495e4131d1..fe4cb74d6d 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T5.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T5.js @@ -17,24 +17,28 @@ var __expected = ["abcdefg","bc","ef"]; __expected.index = 0; __expected.input = "abcdefg"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a(bc)d(ef)g/.exec("abcdefg"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a(bc)d(ef)g/.exec("abcdefg"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a(bc)d(ef)g/.exec("abcdefg"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a(bc)d(ef)g/.exec("abcdefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T6.js b/test/built-ins/RegExp/S15.10.2.8_A3_T6.js index d934778225..b109ea489d 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T6.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T6.js @@ -17,24 +17,28 @@ var __expected = ["abcdefg","abc","defg"]; __expected.index = 0; __expected.input = "abcdefgh"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(.{3})(.{4})/.exec("abcdefgh"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(.{3})(.{4})/.exec("abcdefgh"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(.{3})(.{4})/.exec("abcdefgh"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(.{3})(.{4})/.exec("abcdefgh"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T7.js b/test/built-ins/RegExp/S15.10.2.8_A3_T7.js index 1e45af0485..a7187c32e2 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T7.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T7.js @@ -17,24 +17,28 @@ var __expected = ["aabcdaa","aa"]; __expected.index = 0; __expected.input = "aabcdaabcd"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(aa)bcd\\1/.exec("aabcdaabcd"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(aa)bcd\\1/.exec("aabcdaabcd"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(aa)bcd\\1/.exec("aabcdaabcd"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(aa)bcd\\1/.exec("aabcdaabcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T8.js b/test/built-ins/RegExp/S15.10.2.8_A3_T8.js index 4de50e9cb7..a84020dda2 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T8.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T8.js @@ -17,24 +17,28 @@ var __expected = ["aabcdaa","aa"]; __expected.index = 0; __expected.input = "aabcdaabcd"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(aa).+\\1/.exec("aabcdaabcd"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(aa).+\\1/.exec("aabcdaabcd"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(aa).+\\1/.exec("aabcdaabcd"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(aa).+\\1/.exec("aabcdaabcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A3_T9.js b/test/built-ins/RegExp/S15.10.2.8_A3_T9.js index 806d967354..7eb60853c0 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A3_T9.js +++ b/test/built-ins/RegExp/S15.10.2.8_A3_T9.js @@ -17,24 +17,28 @@ var __expected = ["aabcdaa","aa"]; __expected.index = 0; __expected.input = "aabcdaabcd"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(.{2}).+\\1/.exec("aabcdaabcd"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(.{2}).+\\1/.exec("aabcdaabcd"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(.{2}).+\\1/.exec("aabcdaabcd"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(.{2}).+\\1/.exec("aabcdaabcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A4_T1.js b/test/built-ins/RegExp/S15.10.2.8_A4_T1.js index 7628691b9d..57e2685e3e 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A4_T1.js +++ b/test/built-ins/RegExp/S15.10.2.8_A4_T1.js @@ -17,24 +17,28 @@ var __expected = ["abcde"]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "abcde"; __executed = /ab.de/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "abcde"; __executed = /ab.de/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "abcde"; __executed = /ab.de/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "abcde"; __executed = /ab.de/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A4_T2.js b/test/built-ins/RegExp/S15.10.2.8_A4_T2.js index cc6e478ada..5802a5543d 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A4_T2.js +++ b/test/built-ins/RegExp/S15.10.2.8_A4_T2.js @@ -17,24 +17,28 @@ var __expected = ["line 1"]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "line 1\nline 2"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "line 1\nline 2"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "line 1\nline 2"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "line 1\nline 2"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A4_T3.js b/test/built-ins/RegExp/S15.10.2.8_A4_T3.js index 0d2a064335..a4ea883c9f 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A4_T3.js +++ b/test/built-ins/RegExp/S15.10.2.8_A4_T3.js @@ -17,24 +17,28 @@ var __expected = ["this is a test"]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "this is a test"; __executed = /.*a.*/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "this is a test"; __executed = /.*a.*/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "this is a test"; __executed = /.*a.*/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "this is a test"; __executed = /.*a.*/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A4_T4.js b/test/built-ins/RegExp/S15.10.2.8_A4_T4.js index 2796146d40..6cca46e06a 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A4_T4.js +++ b/test/built-ins/RegExp/S15.10.2.8_A4_T4.js @@ -17,24 +17,28 @@ var __expected = ["this is a *&^%$# test"]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "this is a *&^%$# test"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "this is a *&^%$# test"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "this is a *&^%$# test"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "this is a *&^%$# test"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A4_T5.js b/test/built-ins/RegExp/S15.10.2.8_A4_T5.js index a8fd885881..6ae6d686c2 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A4_T5.js +++ b/test/built-ins/RegExp/S15.10.2.8_A4_T5.js @@ -17,24 +17,28 @@ var __expected = ["...."]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "...."; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "...."; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "...."; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "...."; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A4_T6.js b/test/built-ins/RegExp/S15.10.2.8_A4_T6.js index 7d29dd276e..bc1ff5ec13 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A4_T6.js +++ b/test/built-ins/RegExp/S15.10.2.8_A4_T6.js @@ -17,24 +17,28 @@ var __expected = ["abcdefghijklmnopqrstuvwxyz"]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "abcdefghijklmnopqrstuvwxyz"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "abcdefghijklmnopqrstuvwxyz"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "abcdefghijklmnopqrstuvwxyz"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "abcdefghijklmnopqrstuvwxyz"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A4_T7.js b/test/built-ins/RegExp/S15.10.2.8_A4_T7.js index b2d728dae2..c5cf3f1bd0 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A4_T7.js +++ b/test/built-ins/RegExp/S15.10.2.8_A4_T7.js @@ -17,24 +17,28 @@ var __expected = ["ABCDEFGHIJKLMNOPQRSTUVWXYZ"]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A4_T8.js b/test/built-ins/RegExp/S15.10.2.8_A4_T8.js index c607994076..14b759638c 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A4_T8.js +++ b/test/built-ins/RegExp/S15.10.2.8_A4_T8.js @@ -17,24 +17,28 @@ var __expected = ["`1234567890-=~!@#$%^&*()_+"]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "`1234567890-=~!@#$%^&*()_+"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "`1234567890-=~!@#$%^&*()_+"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "`1234567890-=~!@#$%^&*()_+"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "`1234567890-=~!@#$%^&*()_+"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A4_T9.js b/test/built-ins/RegExp/S15.10.2.8_A4_T9.js index ded3e91e6a..d4c4049feb 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A4_T9.js +++ b/test/built-ins/RegExp/S15.10.2.8_A4_T9.js @@ -17,24 +17,28 @@ var __expected = ["|\\[{]};:\"\',<>.?/"]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "|\\[{]};:\"\',<>.?/"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "|\\[{]};:\"\',<>.?/"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "|\\[{]};:\"\',<>.?/"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "|\\[{]};:\"\',<>.?/"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A5_T1.js b/test/built-ins/RegExp/S15.10.2.8_A5_T1.js index eced711176..61824872c9 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A5_T1.js +++ b/test/built-ins/RegExp/S15.10.2.8_A5_T1.js @@ -16,24 +16,28 @@ var __expected = ["ABC"]; __expected.index = 0; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "ABC def ghi"; __executed = /[a-z]+/ig.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "ABC def ghi"; __executed = /[a-z]+/ig.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "ABC def ghi"; __executed = /[a-z]+/ig.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "ABC def ghi"; __executed = /[a-z]+/ig.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.8_A5_T2.js b/test/built-ins/RegExp/S15.10.2.8_A5_T2.js index 9a6d6d513a..288108fcbd 100644 --- a/test/built-ins/RegExp/S15.10.2.8_A5_T2.js +++ b/test/built-ins/RegExp/S15.10.2.8_A5_T2.js @@ -16,24 +16,28 @@ var __expected = ["def"]; __expected.index = 4; __expected.input = __string; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __string = "ABC def ghi"; __executed = /[a-z]+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __string = "ABC def ghi"; __executed = /[a-z]+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __string = "ABC def ghi"; __executed = /[a-z]+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __string = "ABC def ghi"; __executed = /[a-z]+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.9_A1_T1.js b/test/built-ins/RegExp/S15.10.2.9_A1_T1.js index c7ac6bf732..68f1936bde 100644 --- a/test/built-ins/RegExp/S15.10.2.9_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.2.9_A1_T1.js @@ -18,24 +18,28 @@ var __expected = ["the the", "the"]; __expected.index = 14; __expected.input = "do you listen the the band"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\b(\\w+) \\1\\b/.exec("do you listen the the band"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\b(\\w+) \\1\\b/.exec("do you listen the the band"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\b(\\w+) \\1\\b/.exec("do you listen the the band"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\b(\\w+) \\1\\b/.exec("do you listen the the band"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.9_A1_T2.js b/test/built-ins/RegExp/S15.10.2.9_A1_T2.js index 0aee5980b4..3adf2dc18f 100644 --- a/test/built-ins/RegExp/S15.10.2.9_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.2.9_A1_T2.js @@ -19,24 +19,28 @@ var __expected = ["x01x01", "x01", undefined]; __expected.index = 6; __expected.input = "x09x12x01x01u00FFu00FFx04x04x23"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec("x09x12x01x01u00FFu00FFx04x04x23"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec("x09x12x01x01u00FFu00FFx04x04x23"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec("x09x12x01x01u00FFu00FFx04x04x23"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec("x09x12x01x01u00FFu00FFx04x04x23"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.9_A1_T3.js b/test/built-ins/RegExp/S15.10.2.9_A1_T3.js index 016f197391..b4f5c5e22c 100644 --- a/test/built-ins/RegExp/S15.10.2.9_A1_T3.js +++ b/test/built-ins/RegExp/S15.10.2.9_A1_T3.js @@ -19,24 +19,28 @@ var __expected = ["u00FFu00FF", "u00FF", "FF"]; __expected.index = 12; __expected.input = "x09x12x01x05u00FFu00FFx04x04x23"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec("x09x12x01x05u00FFu00FFx04x04x23"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec("x09x12x01x05u00FFu00FFx04x04x23"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec("x09x12x01x05u00FFu00FFx04x04x23"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec("x09x12x01x05u00FFu00FFx04x04x23"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2.9_A1_T5.js b/test/built-ins/RegExp/S15.10.2.9_A1_T5.js index b0f6953c63..19e3e24d1a 100644 --- a/test/built-ins/RegExp/S15.10.2.9_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.2.9_A1_T5.js @@ -16,24 +16,28 @@ var __expected = ["b", ""]; __expected.index = 0; __expected.input = "baaac"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(a*)b\\1+/.exec("baaac"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(a*)b\\1+/.exec("baaac"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(a*)b\\1+/.exec("baaac"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(a*)b\\1+/.exec("baaac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/S15.10.2_A1_T1.js b/test/built-ins/RegExp/S15.10.2_A1_T1.js index 73ecc7c087..8b17a20f16 100644 --- a/test/built-ins/RegExp/S15.10.2_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.2_A1_T1.js @@ -73,14 +73,15 @@ var __html=""+ ''; ////////////////////////////////////////////////////////////////////////////// -//CHECK#1 try { for(var index=0; index<__patterns.length; index++) { - var __re = new RegExp(__patterns[index]); - __re.test(__html); + var __re = new RegExp(__patterns[index]); + __re.test(__html); } } catch (e) { - throw new Test262Error('#'+index+": XML Shallow Parsing with Regular Expression: "+__patterns[index]); + throw new Test262Error('#'+index+": XML Shallow Parsing with Regular Expression: "+__patterns[index]); } // ////////////////////////////////////////////////////////////////////////////// + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.3.1_A1_T1.js b/test/built-ins/RegExp/S15.10.3.1_A1_T1.js index 9c1d491a27..cdd3562961 100644 --- a/test/built-ins/RegExp/S15.10.3.1_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.3.1_A1_T1.js @@ -13,7 +13,4 @@ var __re = /x/i; var __instance = RegExp(__re); __re.indicator = 1; -//CHECK#1 -if (__instance.indicator !== 1) { - throw new Test262Error('#1: __re = /x/i; __instance = RegExp(__re); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator)); -} +assert.sameValue(__instance.indicator, 1, 'The value of __instance.indicator is expected to be 1'); diff --git a/test/built-ins/RegExp/S15.10.3.1_A1_T2.js b/test/built-ins/RegExp/S15.10.3.1_A1_T2.js index 08f8c05acb..791d93a2af 100644 --- a/test/built-ins/RegExp/S15.10.3.1_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.3.1_A1_T2.js @@ -13,7 +13,4 @@ var __re = new RegExp; var __instance = RegExp(__re, function(){}()); __re.indicator = 1; -//CHECK#1 -if (__instance.indicator !== 1) { - throw new Test262Error('#1: __re = new RegExp; __instance = RegExp(__re, function(){}()); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator)); -} +assert.sameValue(__instance.indicator, 1, 'The value of __instance.indicator is expected to be 1'); diff --git a/test/built-ins/RegExp/S15.10.3.1_A1_T3.js b/test/built-ins/RegExp/S15.10.3.1_A1_T3.js index f3249fd6a9..bf51c43a71 100644 --- a/test/built-ins/RegExp/S15.10.3.1_A1_T3.js +++ b/test/built-ins/RegExp/S15.10.3.1_A1_T3.js @@ -15,9 +15,6 @@ var __re = new RegExp(); var __instance = RegExp(__re, x); __re.indicator = 1; -//CHECK#1 -if (__instance.indicator !== 1) { - throw new Test262Error('#1: __re = new RegExp(); __instance = RegExp(__re, x); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator)); -} +assert.sameValue(__instance.indicator, 1, 'The value of __instance.indicator is expected to be 1'); var x; diff --git a/test/built-ins/RegExp/S15.10.3.1_A1_T4.js b/test/built-ins/RegExp/S15.10.3.1_A1_T4.js index d314864697..abaeb6e82e 100644 --- a/test/built-ins/RegExp/S15.10.3.1_A1_T4.js +++ b/test/built-ins/RegExp/S15.10.3.1_A1_T4.js @@ -13,7 +13,4 @@ var __re = RegExp(); var __instance = RegExp(__re, void 0); __re.indicator = 1; -//CHECK#1 -if (__instance.indicator !== 1) { - throw new Test262Error('#1: __re = RegExp(); __instance = RegExp(__re, void 0); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator)); -} +assert.sameValue(__instance.indicator, 1, 'The value of __instance.indicator is expected to be 1'); diff --git a/test/built-ins/RegExp/S15.10.3.1_A1_T5.js b/test/built-ins/RegExp/S15.10.3.1_A1_T5.js index c12a755414..91b77592e2 100644 --- a/test/built-ins/RegExp/S15.10.3.1_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.3.1_A1_T5.js @@ -13,7 +13,4 @@ var __re = /\b/m; var __instance = RegExp(__re, undefined); __re.indicator = 1; -//CHECK#1 -if (__instance.indicator !== 1) { - throw new Test262Error('#1: __re = /\\b/m; __instance = RegExp(__re, undefined); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator)); -} +assert.sameValue(__instance.indicator, 1, 'The value of __instance.indicator is expected to be 1'); diff --git a/test/built-ins/RegExp/S15.10.3.1_A2_T1.js b/test/built-ins/RegExp/S15.10.3.1_A2_T1.js index e340dd09e5..18c98f702a 100644 --- a/test/built-ins/RegExp/S15.10.3.1_A2_T1.js +++ b/test/built-ins/RegExp/S15.10.3.1_A2_T1.js @@ -11,11 +11,14 @@ description: > exception ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: RegExp(new RegExp("\\d"), "1")) throw SyntaxError. Actual: ' + (RegExp(new RegExp("\d"), "1"))); + throw new Test262Error('#1.1: RegExp(new RegExp("\\d"), "1")) throw SyntaxError. Actual: ' + (RegExp(new RegExp("\d"), "1"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: RegExp(new RegExp("\\d"), "1")) throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.3.1_A2_T2.js b/test/built-ins/RegExp/S15.10.3.1_A2_T2.js index 9ed2e2684a..ee25729b6a 100644 --- a/test/built-ins/RegExp/S15.10.3.1_A2_T2.js +++ b/test/built-ins/RegExp/S15.10.3.1_A2_T2.js @@ -13,11 +13,14 @@ description: > var x = 1; -//CHECK#1 try { - throw new Test262Error('#1.1: var x = 1; RegExp(/[a-b]?/, x) throw SyntaxError. Actual: ' + (RegExp(/[a-b]?/, x))); + throw new Test262Error('#1.1: var x = 1; RegExp(/[a-b]?/, x) throw SyntaxError. Actual: ' + (RegExp(/[a-b]?/, x))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: var x = 1; RegExp(/[a-b]?/, x) throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.3.1_A3_T1.js b/test/built-ins/RegExp/S15.10.3.1_A3_T1.js index 53509ca0c0..cb8689554d 100644 --- a/test/built-ins/RegExp/S15.10.3.1_A3_T1.js +++ b/test/built-ins/RegExp/S15.10.3.1_A3_T1.js @@ -12,12 +12,10 @@ description: R is "d+" and instance is RegExp(R,"i") var __re = "d+"; var __instance = RegExp(__re, "i"); -//CHECK#1 -if (__instance.constructor !== RegExp) { - throw new Test262Error('#1: __re = "d+"; __instance = RegExp(__re, "i"); __instance.constructor === RegExp. Actual: ' + (__instance.constructor)); -} +assert.sameValue( + __instance.constructor, + RegExp, + 'The value of __instance.constructor is expected to equal the value of RegExp' +); -//CHECK#2 -if (__instance.source !== __re) { - throw new Test262Error('#2: __re = "d+"; __instance = RegExp(__re, "i"); __instance.source === __re. Actual: '+ (__instance.source)); -} +assert.sameValue(__instance.source, __re, 'The value of __instance.source is expected to equal the value of __re'); diff --git a/test/built-ins/RegExp/S15.10.3.1_A3_T2.js b/test/built-ins/RegExp/S15.10.3.1_A3_T2.js index 79c9a466e3..1b11c82e04 100644 --- a/test/built-ins/RegExp/S15.10.3.1_A3_T2.js +++ b/test/built-ins/RegExp/S15.10.3.1_A3_T2.js @@ -13,12 +13,10 @@ description: > var __instance = RegExp({toString:function(){return "[a-c]*";}}, "gm"); -//CHECK#1 -if (__instance.constructor !== RegExp) { - throw new Test262Error('#1: __instance = RegExp({toString:function(){return "[a-c]*";}}, "gm"); __instance.constructor === RegExp. Actual: ' + (__instance.constructor)); -} +assert.sameValue( + __instance.constructor, + RegExp, + 'The value of __instance.constructor is expected to equal the value of RegExp' +); -//CHECK#2 -if (__instance.source !== "[a-c]*") { - throw new Test262Error('#2: __instance = RegExp({toString:function(){return "[a-c]*";}}, "gm"); __instance.source === "[a-c]*". Actual: '+ (__instance.source)); -} +assert.sameValue(__instance.source, "[a-c]*", 'The value of __instance.source is expected to be "[a-c]*"'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A1_T1.js b/test/built-ins/RegExp/S15.10.4.1_A1_T1.js index 985863f14e..dbdf04d93a 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.4.1_A1_T1.js @@ -10,24 +10,28 @@ description: Pattern is /./i and RegExp is new RegExp(pattern) ---*/ var __pattern = /./i; -var __re = new RegExp(__pattern); +var __re = new RegExp(__pattern); -//CHECK#1 -if (__re.source !== __pattern.source) { - throw new Test262Error('#1: __pattern = /./i; __re = new RegExp(__pattern); __re.source === __pattern.source. Actual: '+ (__re.source)); -} +assert.sameValue( + __re.source, + __pattern.source, + 'The value of __re.source is expected to equal the value of __pattern.source' +); -//CHECK#2 -if (__re.multiline !== __pattern.multiline) { - throw new Test262Error('#2: __pattern = /./i; __re = new RegExp(__pattern); __re.multiline === __pattern.multiline. Actual: ' + (__re.multiline)); -} +assert.sameValue( + __re.multiline, + __pattern.multiline, + 'The value of __re.multiline is expected to equal the value of __pattern.multiline' +); -//CHECK#3 -if (__re.global !== __pattern.global) { - throw new Test262Error('#3: __pattern = /./i; __re = new RegExp(__pattern); __re.global === __pattern.global. Actual: ' + (__re.global)); -} +assert.sameValue( + __re.global, + __pattern.global, + 'The value of __re.global is expected to equal the value of __pattern.global' +); -//CHECK#4 -if (__re.ignoreCase !== __pattern.ignoreCase) { - throw new Test262Error('#4: __pattern = /./i; __re = new RegExp(__pattern); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue( + __re.ignoreCase, + __pattern.ignoreCase, + 'The value of __re.ignoreCase is expected to equal the value of __pattern.ignoreCase' +); diff --git a/test/built-ins/RegExp/S15.10.4.1_A1_T2.js b/test/built-ins/RegExp/S15.10.4.1_A1_T2.js index 0f2b6f375c..3aa13186c4 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.4.1_A1_T2.js @@ -14,24 +14,28 @@ description: > var __pattern = /\t/m; var __re = new RegExp(__pattern, x); -//CHECK#1 -if (__re.source !== __pattern.source) { - throw new Test262Error('#1: __pattern = /\\t/m; _re = new RegExp(__pattern, x); var x; __re.source === __pattern.source. Actual: '+ (__re.source)); -} +assert.sameValue( + __re.source, + __pattern.source, + 'The value of __re.source is expected to equal the value of __pattern.source' +); -//CHECK#2 -if (__re.multiline !== __pattern.multiline) { - throw new Test262Error('#2: __pattern = /\\t/m; _re = new RegExp(__pattern, x); var x; __re.multiline === __pattern.multiline. Actual: ' + (__re.multiline)); -} +assert.sameValue( + __re.multiline, + __pattern.multiline, + 'The value of __re.multiline is expected to equal the value of __pattern.multiline' +); -//CHECK#3 -if (__re.global !== __pattern.global) { - throw new Test262Error('#3: __pattern = /\\t/m; _re = new RegExp(__pattern, x); var x; __re.global === __pattern.global. Actual: ' + (__re.global)); -} +assert.sameValue( + __re.global, + __pattern.global, + 'The value of __re.global is expected to equal the value of __pattern.global' +); -//CHECK#4 -if (__re.ignoreCase !== __pattern.ignoreCase) { - throw new Test262Error('#4: __pattern = /\\t/m; _re = new RegExp(__pattern, x); var x; __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue( + __re.ignoreCase, + __pattern.ignoreCase, + 'The value of __re.ignoreCase is expected to equal the value of __pattern.ignoreCase' +); var x; diff --git a/test/built-ins/RegExp/S15.10.4.1_A1_T3.js b/test/built-ins/RegExp/S15.10.4.1_A1_T3.js index 90b19d2977..fdd89ee219 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A1_T3.js +++ b/test/built-ins/RegExp/S15.10.4.1_A1_T3.js @@ -12,22 +12,26 @@ description: Pattern is /[a-b]/g and RegExp is new RegExp(pattern,void 0) var __pattern = /[a-b]/g; var __re = new RegExp(__pattern, void 0); -//CHECK#1 -if (__re.source !== __pattern.source) { - throw new Test262Error('#1: __pattern = /[a-b]/g; __re = new RegExp(__pattern, void 0); __re.source === __pattern.source. Actual: '+ (__re.source)); -} +assert.sameValue( + __re.source, + __pattern.source, + 'The value of __re.source is expected to equal the value of __pattern.source' +); -//CHECK#2 -if (__re.multiline !== __pattern.multiline) { - throw new Test262Error('#2: __pattern = /[a-b]/g; __re = new RegExp(__pattern, void 0); __re.multiline === __pattern.multiline. Actual: ' + (__re.multiline)); -} +assert.sameValue( + __re.multiline, + __pattern.multiline, + 'The value of __re.multiline is expected to equal the value of __pattern.multiline' +); -//CHECK#3 -if (__re.global !== __pattern.global) { - throw new Test262Error('#3: __pattern = /[a-b]/g; __re = new RegExp(__pattern, void 0); __re.global === __pattern.global. Actual: ' + (__re.global)); -} +assert.sameValue( + __re.global, + __pattern.global, + 'The value of __re.global is expected to equal the value of __pattern.global' +); -//CHECK#4 -if (__re.ignoreCase !== __pattern.ignoreCase) { - throw new Test262Error('#4: __pattern = /[a-b]/g; __re = new RegExp(__pattern, void 0); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue( + __re.ignoreCase, + __pattern.ignoreCase, + 'The value of __re.ignoreCase is expected to equal the value of __pattern.ignoreCase' +); diff --git a/test/built-ins/RegExp/S15.10.4.1_A1_T4.js b/test/built-ins/RegExp/S15.10.4.1_A1_T4.js index 1bc0d399ed..5ed57d75f8 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A1_T4.js +++ b/test/built-ins/RegExp/S15.10.4.1_A1_T4.js @@ -12,22 +12,26 @@ description: Pattern is new RegExp and RegExp is new RegExp(pattern,undefined) var __pattern = new RegExp; var __re = new RegExp(__pattern, undefined); -//CHECK#1 -if (__re.source !== __pattern.source) { - throw new Test262Error('#1: __pattern = new RegExp; __re = new RegExp(__pattern, undefined); __re.source === __pattern.source. Actual: '+ (__re.source)); -} +assert.sameValue( + __re.source, + __pattern.source, + 'The value of __re.source is expected to equal the value of __pattern.source' +); -//CHECK#2 -if (__re.multiline !== __pattern.multiline) { - throw new Test262Error('#2: __pattern = new RegExp; __re = new RegExp(__pattern, undefined); __re.multiline === __pattern.multiline. Actual: ' + (__re.multiline)); -} +assert.sameValue( + __re.multiline, + __pattern.multiline, + 'The value of __re.multiline is expected to equal the value of __pattern.multiline' +); -//CHECK#3 -if (__re.global !== __pattern.global) { - throw new Test262Error('#3: __pattern = new RegExp; __re = new RegExp(__pattern, undefined); __re.global === __pattern.global. Actual: ' + (__re.global)); -} +assert.sameValue( + __re.global, + __pattern.global, + 'The value of __re.global is expected to equal the value of __pattern.global' +); -//CHECK#4 -if (__re.ignoreCase !== __pattern.ignoreCase) { - throw new Test262Error('#4: __pattern = new RegExp; __re = new RegExp(__pattern, undefined); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue( + __re.ignoreCase, + __pattern.ignoreCase, + 'The value of __re.ignoreCase is expected to equal the value of __pattern.ignoreCase' +); diff --git a/test/built-ins/RegExp/S15.10.4.1_A1_T5.js b/test/built-ins/RegExp/S15.10.4.1_A1_T5.js index f988e38397..b89cdf8d7e 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A1_T5.js +++ b/test/built-ins/RegExp/S15.10.4.1_A1_T5.js @@ -14,22 +14,26 @@ description: > var __pattern = RegExp("1?","mig"); var __re = new RegExp(__pattern, (function(){})()); -//CHECK#1 -if (__re.source !== __pattern.source) { - throw new Test262Error('#1: __pattern = RegExp("1?","mig"); __re = new RegExp(__pattern, (function(){})()); __re.source === __pattern.source. Actual: '+ (__re.source)); -} +assert.sameValue( + __re.source, + __pattern.source, + 'The value of __re.source is expected to equal the value of __pattern.source' +); -//CHECK#2 -if (__re.multiline !== __pattern.multiline) { - throw new Test262Error('#2: __pattern = RegExp("1?","mig"); __re = new RegExp(__pattern, (function(){})()); __re.multiline === __pattern.multiline. Actual: ' + (__re.multiline)); -} +assert.sameValue( + __re.multiline, + __pattern.multiline, + 'The value of __re.multiline is expected to equal the value of __pattern.multiline' +); -//CHECK#3 -if (__re.global !== __pattern.global) { - throw new Test262Error('#3: __pattern = RegExp("1?","mig"); __re = new RegExp(__pattern, (function(){})()); __re.global === __pattern.global. Actual: ' + (__re.global)); -} +assert.sameValue( + __re.global, + __pattern.global, + 'The value of __re.global is expected to equal the value of __pattern.global' +); -//CHECK#4 -if (__re.ignoreCase !== __pattern.ignoreCase) { - throw new Test262Error('#4: __pattern = RegExp("1?","mig"); __re = new RegExp(__pattern, (function(){})()); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue( + __re.ignoreCase, + __pattern.ignoreCase, + 'The value of __re.ignoreCase is expected to equal the value of __pattern.ignoreCase' +); diff --git a/test/built-ins/RegExp/S15.10.4.1_A2_T1.js b/test/built-ins/RegExp/S15.10.4.1_A2_T1.js index 2c32566358..93fd837948 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A2_T1.js +++ b/test/built-ins/RegExp/S15.10.4.1_A2_T1.js @@ -11,6 +11,5 @@ description: > pattern is "/\u0042/i", does not fail ---*/ -//CHECK#1 var regExpObj = new RegExp(/\u0042/i, "i"); assert(regExpObj.ignoreCase); diff --git a/test/built-ins/RegExp/S15.10.4.1_A2_T2.js b/test/built-ins/RegExp/S15.10.4.1_A2_T2.js index 8166a1f52c..9bd2f6af62 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A2_T2.js +++ b/test/built-ins/RegExp/S15.10.4.1_A2_T2.js @@ -12,11 +12,14 @@ description: > pattern is "/1?1/mig", fails ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: new RegExp(/1?1/mig, {}) throw SyntaxError. Actual: ' + (new RegExp(/1?1/mig, {}))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp(/1?1/mig, {}) throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A3_T1.js b/test/built-ins/RegExp/S15.10.4.1_A3_T1.js index 0264824bdb..3565d27053 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A3_T1.js +++ b/test/built-ins/RegExp/S15.10.4.1_A3_T1.js @@ -9,17 +9,6 @@ description: RegExp is new RegExp var __re = new RegExp; -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp; __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp; __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.ignoreCase !== false) { - throw new Test262Error('#4: __re = new RegExp; __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A3_T2.js b/test/built-ins/RegExp/S15.10.4.1_A3_T2.js index 459c23b7bc..650db85e7f 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A3_T2.js +++ b/test/built-ins/RegExp/S15.10.4.1_A3_T2.js @@ -9,17 +9,6 @@ description: RegExp is new RegExp(void 0) var __re = new RegExp(void 0); -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp(void 0); __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp(void 0); __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.ignoreCase !== false) { - throw new Test262Error('#4: __re = new RegExp(void 0); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A3_T3.js b/test/built-ins/RegExp/S15.10.4.1_A3_T3.js index ff1849cc22..3b7a94179d 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A3_T3.js +++ b/test/built-ins/RegExp/S15.10.4.1_A3_T3.js @@ -9,19 +9,8 @@ description: RegExp is new RegExp(x), where x is undefined variable var __re = new RegExp(x); -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp(x); var x; __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp(x); var x; __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.ignoreCase !== false) { - throw new Test262Error('#4: __re = new RegExp(x); var x; __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); var x; diff --git a/test/built-ins/RegExp/S15.10.4.1_A3_T4.js b/test/built-ins/RegExp/S15.10.4.1_A3_T4.js index 5dcb9ea2b1..4729022234 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A3_T4.js +++ b/test/built-ins/RegExp/S15.10.4.1_A3_T4.js @@ -9,17 +9,6 @@ description: RegExp is new RegExp(undefined) var __re = new RegExp(undefined); -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp(undefined); __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp(undefined); __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.ignoreCase !== false) { - throw new Test262Error('#4: __re = new RegExp(undefined); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A3_T5.js b/test/built-ins/RegExp/S15.10.4.1_A3_T5.js index 966899c55e..60584f994a 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A3_T5.js +++ b/test/built-ins/RegExp/S15.10.4.1_A3_T5.js @@ -9,17 +9,6 @@ description: RegExp is new RegExp((function(){})()) var __re = new RegExp((function(){})()); -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp((function(){})()); __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp((function(){})()); __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.ignoreCase !== false) { - throw new Test262Error('#4: __re = new RegExp((function(){})()); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A4_T1.js b/test/built-ins/RegExp/S15.10.4.1_A4_T1.js index dc19e079d0..242fa97fd9 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A4_T1.js +++ b/test/built-ins/RegExp/S15.10.4.1_A4_T1.js @@ -9,22 +9,7 @@ description: RegExp is new RegExp(undefined) var __re = new RegExp(null, void 0); -//CHECK#1 -if (__re.source !== "null") { - throw new Test262Error('#1: __re = new RegExp(null, void 0); __re.source === "null". Actual: '+ (__re.source)); -} - -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp(null, void 0); __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp(null, void 0); __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.ignoreCase !== false) { - throw new Test262Error('#4: __re = new RegExp(null, void 0); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue(__re.source, "null", 'The value of __re.source is expected to be "null"'); +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A4_T2.js b/test/built-ins/RegExp/S15.10.4.1_A4_T2.js index 20505be94d..98b4a82ca6 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A4_T2.js +++ b/test/built-ins/RegExp/S15.10.4.1_A4_T2.js @@ -9,17 +9,6 @@ description: RegExp is new RegExp(undefined,undefined) var __re = new RegExp(undefined, undefined); -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp(undefined, undefined); __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp(undefined, undefined); __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.ignoreCase !== false) { - throw new Test262Error('#4: __re = new RegExp(undefined, undefined); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A4_T3.js b/test/built-ins/RegExp/S15.10.4.1_A4_T3.js index 34f642c8c4..b8584a404f 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A4_T3.js +++ b/test/built-ins/RegExp/S15.10.4.1_A4_T3.js @@ -9,17 +9,6 @@ description: Use undefined properties of object as flags of RegExp var __re = new RegExp({}.p, {}.q); -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp({}.p, {}.q); __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp({}.p, {}.q); __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.ignoreCase !== false) { - throw new Test262Error('#4: __re = new RegExp({}.p, {}.q); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A4_T4.js b/test/built-ins/RegExp/S15.10.4.1_A4_T4.js index 976e3250ff..86aae29653 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A4_T4.js +++ b/test/built-ins/RegExp/S15.10.4.1_A4_T4.js @@ -9,22 +9,7 @@ description: RegExp is new RegExp(null,void 0) var __re = new RegExp(null, void 0); -//CHECK#1 -if (__re.source !== "null") { - throw new Test262Error('#1: __re = new RegExp(null, void 0); __re.source === "null". Actual: '+ (__re.source)); -} - -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp(null, void 0); __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp(null, void 0); __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.ignoreCase !== false) { - throw new Test262Error('#4: __re = new RegExp(null, void 0); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue(__re.source, "null", 'The value of __re.source is expected to be "null"'); +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A4_T5.js b/test/built-ins/RegExp/S15.10.4.1_A4_T5.js index 4dbe3ba1f1..ca78095b13 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A4_T5.js +++ b/test/built-ins/RegExp/S15.10.4.1_A4_T5.js @@ -9,17 +9,6 @@ description: RegExp is new RegExp("",(function(){})()) var __re = new RegExp("", (function(){})()); -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp("", (function(){})()); __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp("", (function(){})()); __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.ignoreCase !== false) { - throw new Test262Error('#4: __re = new RegExp("", (function(){})()); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A5_T1.js b/test/built-ins/RegExp/S15.10.4.1_A5_T1.js index f5d4c5e1a0..ec6e924edb 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A5_T1.js +++ b/test/built-ins/RegExp/S15.10.4.1_A5_T1.js @@ -9,11 +9,14 @@ es5id: 15.10.4.1_A5_T1 description: Checking if using "ii" as F leads to throwing the correct exception ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp(undefined,"ii") throw SyntaxError. Actual: ' + (new RegExp(undefined,"ii"))); + throw new Test262Error('#1.1: new RegExp(undefined,"ii") throw SyntaxError. Actual: ' + (new RegExp(undefined,"ii"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp(undefined,"ii") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A5_T3.js b/test/built-ins/RegExp/S15.10.4.1_A5_T3.js index 21d6b74dfb..afb26cbc78 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A5_T3.js +++ b/test/built-ins/RegExp/S15.10.4.1_A5_T3.js @@ -9,11 +9,14 @@ es5id: 15.10.4.1_A5_T3 description: Checking by using eval, try to use eval("\"migr\"") as F ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("",eval("\\"migr\\"")) throw SyntaxError. Actual: ' + (new RegExp("",eval("\"migr\"")))); + throw new Test262Error('#1.1: new RegExp("",eval("\\"migr\\"")) throw SyntaxError. Actual: ' + (new RegExp("",eval("\"migr\"")))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("",eval("\\"migr\\"")) throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A5_T4.js b/test/built-ins/RegExp/S15.10.4.1_A5_T4.js index 47f9ca470c..e91a1291b1 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A5_T4.js +++ b/test/built-ins/RegExp/S15.10.4.1_A5_T4.js @@ -9,11 +9,14 @@ es5id: 15.10.4.1_A5_T4 description: Checking if using "z" as F leads to throwing the correct exception ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("a|b","z") throw SyntaxError. Actual: ' + (new RegExp("a|b","z"))); + throw new Test262Error('#1.1: new RegExp("a|b","z") throw SyntaxError. Actual: ' + (new RegExp("a|b","z"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("a|b","z") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A5_T6.js b/test/built-ins/RegExp/S15.10.4.1_A5_T6.js index bddec7e8e4..d05c50a5ba 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A5_T6.js +++ b/test/built-ins/RegExp/S15.10.4.1_A5_T6.js @@ -11,11 +11,14 @@ description: > exception ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp(".",null) throw SyntaxError. Actual: ' + (new RegExp(".",null))); + throw new Test262Error('#1.1: new RegExp(".",null) throw SyntaxError. Actual: ' + (new RegExp(".",null))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp(".",null) throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A5_T7.js b/test/built-ins/RegExp/S15.10.4.1_A5_T7.js index 7ab18ccf76..1233a90206 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A5_T7.js +++ b/test/built-ins/RegExp/S15.10.4.1_A5_T7.js @@ -9,11 +9,14 @@ es5id: 15.10.4.1_A5_T7 description: Checking if using 1.0 as F leads to throwing the correct exception ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("^",1.0) throw SyntaxError. Actual: ' + (new RegExp("^",1.0))); + throw new Test262Error('#1.1: new RegExp("^",1.0) throw SyntaxError. Actual: ' + (new RegExp("^",1.0))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("^",1.0) throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A5_T8.js b/test/built-ins/RegExp/S15.10.4.1_A5_T8.js index 263a953aa9..270e6bbd2d 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A5_T8.js +++ b/test/built-ins/RegExp/S15.10.4.1_A5_T8.js @@ -11,11 +11,14 @@ description: > exception ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("|",true) throw SyntaxError. Actual: ' + (new RegExp("|",true))); + throw new Test262Error('#1.1: new RegExp("|",true) throw SyntaxError. Actual: ' + (new RegExp("|",true))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("|",true) throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A5_T9.js b/test/built-ins/RegExp/S15.10.4.1_A5_T9.js index 18a11e08ca..30208b4aaf 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A5_T9.js +++ b/test/built-ins/RegExp/S15.10.4.1_A5_T9.js @@ -11,11 +11,14 @@ description: > the correct exception ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("$sup",{toString:function(){}}) throw SyntaxError. Actual: ' + (new RegExp("$sup",{toString:function(){}}))); + throw new Test262Error('#1.1: new RegExp("$sup",{toString:function(){}}) throw SyntaxError. Actual: ' + (new RegExp("$sup",{toString:function(){}}))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("$sup",{toString:function(){}}) throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A6_T1.js b/test/built-ins/RegExp/S15.10.4.1_A6_T1.js index fff1417328..bb7150add4 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A6_T1.js +++ b/test/built-ins/RegExp/S15.10.4.1_A6_T1.js @@ -10,7 +10,4 @@ description: Checking [[Class]] property of the newly constructed object var __re = new RegExp; __re.toString = Object.prototype.toString; -//CHECK#1 -if (__re.toString() !== "[object "+"RegExp"+"]") { - throw new Test262Error('#1: __re = new RegExp; __re.toString = Object.prototype.toString; __re.toString() === "[object "+"RegExp"+"]". Actual: ' + (__re.toString())); -} +assert.sameValue(__re.toString(), "[object "+"RegExp"+"]", '__re.toString() must return "[object "+"RegExp"+"]"'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A7_T1.js b/test/built-ins/RegExp/S15.10.4.1_A7_T1.js index c0d9249dfd..70c5176706 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A7_T1.js +++ b/test/built-ins/RegExp/S15.10.4.1_A7_T1.js @@ -15,7 +15,4 @@ description: > var __re = new RegExp; RegExp.prototype.indicator = 1; -//CHECK#1 -if (__re.indicator !== 1) { - throw new Test262Error('#1: __re = new RegExp; RegExp.prototype.indicator = 1; __re.indicator === 1. Actual: ' + (__re.indicator)); -} +assert.sameValue(__re.indicator, 1, 'The value of __re.indicator is expected to be 1'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A7_T2.js b/test/built-ins/RegExp/S15.10.4.1_A7_T2.js index 531d5cadd9..d69a93e04a 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A7_T2.js +++ b/test/built-ins/RegExp/S15.10.4.1_A7_T2.js @@ -12,7 +12,8 @@ description: Checking [[Prototype]] property of the newly constructed object var __re = new RegExp(); -//CHECK#1 -if (RegExp.prototype.isPrototypeOf(__re) !== true) { - throw new Test262Error('#1: __re = new RegExp(); RegExp.prototype.isPrototypeOf(__re) === true. Actual: ' + (RegExp.prototype.isPrototypeOf(__re))); -} +assert.sameValue( + RegExp.prototype.isPrototypeOf(__re), + true, + 'RegExp.prototype.isPrototypeOf(new RegExp()) must return true' +); diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T1.js b/test/built-ins/RegExp/S15.10.4.1_A8_T1.js index 48feb45606..ca0b9a0bda 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T1.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T1.js @@ -9,27 +9,8 @@ description: Pattern is "a|b" and flags is "i" var __re = new RegExp("a|b","i"); -//CHECK#1 -if (__re.ignoreCase !== true) { - throw new Test262Error('#1: __re = new RegExp("a|b","i"); __re.ignoreCase === true. Actual: ' + (__re.ignoreCase)); -} - -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp("a|b","i"); __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp("a|b","i"); __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.lastIndex !== 0) { - throw new Test262Error('#4: __re = new RegExp("a|b","i"); __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); -} - -//CHECK#5 -if (typeof __re.source === "undefined") { - throw new Test262Error('#5: __re = new RegExp("a|b","i"); typeof __re.source !== "undefined"'); -} +assert.sameValue(__re.ignoreCase, true, 'The value of __re.ignoreCase is expected to be true'); +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.lastIndex, 0, 'The value of __re.lastIndex is expected to be 0'); +assert.notSameValue(typeof __re.source, "undefined", 'The value of typeof __re.source is not "undefined"'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T10.js b/test/built-ins/RegExp/S15.10.4.1_A8_T10.js index 8b3fc0624d..a0030e72b2 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T10.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T10.js @@ -9,27 +9,8 @@ description: Pattern is true and flags is "m" var __re = new RegExp(true,"m"); -//CHECK#1 -if (__re.ignoreCase !== false) { - throw new Test262Error('#1: __re = new RegExp(true,"m"); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} - -//CHECK#2 -if (__re.multiline !== true) { - throw new Test262Error('#2: __re = new RegExp(true,"m"); __re.multiline === true. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp(true,"m"); __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.lastIndex !== 0) { - throw new Test262Error('#4: __re = new RegExp(true,"m"); __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); -} - -//CHECK#5 -if (typeof __re.source === "undefined") { - throw new Test262Error('#5: __re = new RegExp(true,"m"); typeof __re.source !== "undefined"'); -} +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); +assert.sameValue(__re.multiline, true, 'The value of __re.multiline is expected to be true'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.lastIndex, 0, 'The value of __re.lastIndex is expected to be 0'); +assert.notSameValue(typeof __re.source, "undefined", 'The value of typeof __re.source is not "undefined"'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T11.js b/test/built-ins/RegExp/S15.10.4.1_A8_T11.js index e0f2ed20d0..f54686986c 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T11.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T11.js @@ -9,27 +9,8 @@ description: Checking by using eval, pattern is Math and flags is eval("\"g\"") var __re = new RegExp(Math,eval("\"g\"")); -//CHECK#1 -if (__re.ignoreCase !== false) { - throw new Test262Error('#1: __re = new RegExp(Math,eval("\\"g\\"")); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} - -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp(Math,eval("\\"g\\"")); __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== true) { - throw new Test262Error('#3: __re = new RegExp(Math,eval("\\"g\\"")); __re.global === true. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.lastIndex !== 0) { - throw new Test262Error('#4: __re = new RegExp(Math,eval("\\"g\\"")); __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); -} - -//CHECK#5 -if (typeof __re.source === "undefined") { - throw new Test262Error('#5: __re = new RegExp(Math,eval("\\"g\\"")); typeof __re.source !== "undefined"'); -} +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, true, 'The value of __re.global is expected to be true'); +assert.sameValue(__re.lastIndex, 0, 'The value of __re.lastIndex is expected to be 0'); +assert.notSameValue(typeof __re.source, "undefined", 'The value of typeof __re.source is not "undefined"'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T12.js b/test/built-ins/RegExp/S15.10.4.1_A8_T12.js index a320531dbf..eb7fbbb10b 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T12.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T12.js @@ -9,11 +9,10 @@ description: > valueOf:function(){throw "invalof";} } ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("\\u0042", {toString:void 0, valueOf:function(){throw "invalof";}}) throw "invalof". Actual: ' + (new RegExp("\u0042", {toString:void 0, valueOf:function(){throw "invalof";}}))); + throw new Test262Error('#1.1: new RegExp("\\u0042", {toString:void 0, valueOf:function(){throw "invalof";}}) throw "invalof". Actual: ' + (new RegExp("\u0042", {toString:void 0, valueOf:function(){throw "invalof";}}))); } catch (e) { - if (e !== "invalof" ) { - throw new Test262Error('#1.2: new RegExp("\\u0042", {toString:void 0, valueOf:function(){throw "invalof";}}) throw "invalof". Actual: ' + (e)); - } + assert.sameValue(e, "invalof", 'The value of e is expected to be "invalof"'); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T13.js b/test/built-ins/RegExp/S15.10.4.1_A8_T13.js index e2ee2d4403..34b3156707 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T13.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T13.js @@ -9,11 +9,10 @@ description: > } ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("1", {toString:function(){throw "intostr";}}) throw "intostr". Actual: ' + (new RegExp("1", {toString:function(){throw "intostr";}}))); + throw new Test262Error('#1.1: new RegExp("1", {toString:function(){throw "intostr";}}) throw "intostr". Actual: ' + (new RegExp("1", {toString:function(){throw "intostr";}}))); } catch (e) { - if (e !== "intostr" ) { - throw new Test262Error('#1.2: new RegExp("1", {toString:function(){throw "intostr";}}) throw "intostr". Actual: ' + (e)); - } + assert.sameValue(e, "intostr", 'The value of e is expected to be "intostr"'); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T2.js b/test/built-ins/RegExp/S15.10.4.1_A8_T2.js index 1afa7d6c9c..e9c7cbe8e6 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T2.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T2.js @@ -9,27 +9,8 @@ description: Pattern is function(){return "a|b|[]";}() and flags is "ig" var __re = new RegExp(function(){return "a|b|[]";}(),"ig"); -//CHECK#1 -if (__re.ignoreCase !== true) { - throw new Test262Error('#1: __re = new RegExp(function(){return "a|b|[]"; __re.ignoreCase === true. Actual: ' + (__re.ignoreCase)); -} - -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp(function(){return "a|b|[]"; __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== true) { - throw new Test262Error('#3: __re = new RegExp(function(){return "a|b|[]"; __re.global === true. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.lastIndex !== 0) { - throw new Test262Error('#4: __re = new RegExp(function(){return "a|b|[]"; __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); -} - -//CHECK#5 -if (typeof __re.source === "undefined") { - throw new Test262Error('#5: __re = new RegExp(function(){return "a|b|[]"; typeof __re.source !== "undefined"'); -} +assert.sameValue(__re.ignoreCase, true, 'The value of __re.ignoreCase is expected to be true'); +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, true, 'The value of __re.global is expected to be true'); +assert.sameValue(__re.lastIndex, 0, 'The value of __re.lastIndex is expected to be 0'); +assert.notSameValue(typeof __re.source, "undefined", 'The value of typeof __re.source is not "undefined"'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T3.js b/test/built-ins/RegExp/S15.10.4.1_A8_T3.js index ac3eff9366..3b73b27900 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T3.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T3.js @@ -11,27 +11,8 @@ description: > var __re = new RegExp({toString:function(){return "[0-9]";}}, (function(){return "m";})()); -//CHECK#1 -if (__re.ignoreCase !== false) { - throw new Test262Error('#1: __re = new RegExp({toString:function(){return "[0-9]"; __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} - -//CHECK#2 -if (__re.multiline !== true) { - throw new Test262Error('#2: __re = new RegExp({toString:function(){return "[0-9]"; __re.multiline === true. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp({toString:function(){return "[0-9]"; __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.lastIndex !== 0) { - throw new Test262Error('#4: __re = new RegExp({toString:function(){return "[0-9]"; __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); -} - -//CHECK#5 -if (typeof __re.source === "undefined") { - throw new Test262Error('#5: __re = new RegExp({toString:function(){return "[0-9]"; typeof __re.source !== "undefined"'); -} +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); +assert.sameValue(__re.multiline, true, 'The value of __re.multiline is expected to be true'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.lastIndex, 0, 'The value of __re.lastIndex is expected to be 0'); +assert.notSameValue(typeof __re.source, "undefined", 'The value of typeof __re.source is not "undefined"'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T4.js b/test/built-ins/RegExp/S15.10.4.1_A8_T4.js index 84f766f772..a7c3cbfd4c 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T4.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T4.js @@ -11,27 +11,8 @@ description: > var __re = new RegExp({toString:void 0,valueOf:function(){return "[z-z]";}}, {toString:void 0,valueOf:function(){return "mig";}}); -//CHECK#1 -if (__re.ignoreCase !== true) { - throw new Test262Error('#1: __re = new RegExp({toString:void 0,valueOf:function(){return "[z-z]"; __re.ignoreCase === true. Actual: ' + (__re.ignoreCase)); -} - -//CHECK#2 -if (__re.multiline !== true) { - throw new Test262Error('#2: __re = new RegExp({toString:void 0,valueOf:function(){return "[z-z]"; __re.multiline === true. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== true) { - throw new Test262Error('#3: __re = new RegExp({toString:void 0,valueOf:function(){return "[z-z]"; __re.global === true. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.lastIndex !== 0) { - throw new Test262Error('#4: __re = new RegExp({toString:void 0,valueOf:function(){return "[z-z]"; __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); -} - -//CHECK#5 -if (typeof __re.source === "undefined") { - throw new Test262Error('#5: __re = new RegExp({toString:void 0,valueOf:function(){return "[z-z]"; typeof __re.source !== "undefined"'); -} +assert.sameValue(__re.ignoreCase, true, 'The value of __re.ignoreCase is expected to be true'); +assert.sameValue(__re.multiline, true, 'The value of __re.multiline is expected to be true'); +assert.sameValue(__re.global, true, 'The value of __re.global is expected to be true'); +assert.sameValue(__re.lastIndex, 0, 'The value of __re.lastIndex is expected to be 0'); +assert.notSameValue(typeof __re.source, "undefined", 'The value of typeof __re.source is not "undefined"'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T5.js b/test/built-ins/RegExp/S15.10.4.1_A8_T5.js index 51450e882e..8f20e4ed80 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T5.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T5.js @@ -11,27 +11,8 @@ description: > var __re = new RegExp(new Object("abc{1}"), {toString:function(){return "";}}); -//CHECK#1 -if (__re.ignoreCase !== false) { - throw new Test262Error('#1: __re = new RegExp(new Object("abc{1}"), {toString:function(){return ""; __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); -} - -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp(new Object("abc{1}"), {toString:function(){return ""; __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== false) { - throw new Test262Error('#3: __re = new RegExp(new Object("abc{1}"), {toString:function(){return ""; __re.global === false. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.lastIndex !== 0) { - throw new Test262Error('#4: __re = new RegExp(new Object("abc{1}"), {toString:function(){return ""; __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); -} - -//CHECK#5 -if (typeof __re.source === "undefined") { - throw new Test262Error('#5: __re = new RegExp(new Object("abc{1}"), {toString:function(){return ""; typeof __re.source !== "undefined"'); -} +assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false'); +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false'); +assert.sameValue(__re.lastIndex, 0, 'The value of __re.lastIndex is expected to be 0'); +assert.notSameValue(typeof __re.source, "undefined", 'The value of typeof __re.source is not "undefined"'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T6.js b/test/built-ins/RegExp/S15.10.4.1_A8_T6.js index 9ec0f17c41..65a3a37e85 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T6.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T6.js @@ -9,11 +9,10 @@ description: > "i" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp({toString:function(){throw "intostr";}}, "i") throw "intostr". Actual: ' + (new RegExp({toString:function(){throw "intostr";}}, "i"))); + throw new Test262Error('#1.1: new RegExp({toString:function(){throw "intostr";}}, "i") throw "intostr". Actual: ' + (new RegExp({toString:function(){throw "intostr";}}, "i"))); } catch (e) { - if (e !== "intostr" ) { - throw new Test262Error('#1.2: new RegExp({toString:function(){throw "intostr";}}, "i") throw "intostr". Actual: ' + (e)); - } + assert.sameValue(e, "intostr", 'The value of e is expected to be "intostr"'); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T7.js b/test/built-ins/RegExp/S15.10.4.1_A8_T7.js index 8b1b1b760c..b0f0e1472c 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T7.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T7.js @@ -9,11 +9,10 @@ description: > } and flags is "i" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp({toString:void 0, valueOf:function(){throw "invalof";}}) throw "invalof". Actual: ' + (new RegExp({toString:void 0, valueOf:function(){throw "invalof";}}))); + throw new Test262Error('#1.1: new RegExp({toString:void 0, valueOf:function(){throw "invalof";}}) throw "invalof". Actual: ' + (new RegExp({toString:void 0, valueOf:function(){throw "invalof";}}))); } catch (e) { - if (e !== "invalof" ) { - throw new Test262Error('#1.2: new RegExp({toString:void 0, valueOf:function(){throw "invalof";}}) throw "invalof". Actual: ' + (e)); - } + assert.sameValue(e, "invalof", 'The value of e is expected to be "invalof"'); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T8.js b/test/built-ins/RegExp/S15.10.4.1_A8_T8.js index 7f5a1edc81..fa4df65f9f 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T8.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T8.js @@ -9,11 +9,10 @@ description: > "error" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp({toString:function(){throw "intostr";}}, "error") throw "intostr". Actual: ' + (new RegExp({toString:function(){throw "intostr";}}, "error"))); + throw new Test262Error('#1.1: new RegExp({toString:function(){throw "intostr";}}, "error") throw "intostr". Actual: ' + (new RegExp({toString:function(){throw "intostr";}}, "error"))); } catch (e) { - if (e !== "intostr" ) { - throw new Test262Error('#1.2: new RegExp({toString:function(){throw "intostr";}}, "error") throw "intostr". Actual: ' + (e)); - } + assert.sameValue(e, "intostr", 'The value of e is expected to be "intostr"'); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A8_T9.js b/test/built-ins/RegExp/S15.10.4.1_A8_T9.js index 18344160ef..b1a95f3298 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A8_T9.js +++ b/test/built-ins/RegExp/S15.10.4.1_A8_T9.js @@ -9,27 +9,8 @@ description: Pattern is 1 and flags is new Object("gi") var __re = new RegExp(1, new Object("gi")); -//CHECK#1 -if (__re.ignoreCase !== true) { - throw new Test262Error('#1: __re = new RegExp(1, new Object("gi")); __re.ignoreCase === true. Actual: ' + (__re.ignoreCase)); -} - -//CHECK#2 -if (__re.multiline !== false) { - throw new Test262Error('#2: __re = new RegExp(1, new Object("gi")); __re.multiline === false. Actual: ' + (__re.multiline)); -} - -//CHECK#3 -if (__re.global !== true) { - throw new Test262Error('#3: __re = new RegExp(1, new Object("gi")); __re.global === true. Actual: ' + (__re.global)); -} - -//CHECK#4 -if (__re.lastIndex !== 0) { - throw new Test262Error('#4: __re = new RegExp(1, new Object("gi")); __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); -} - -//CHECK#5 -if (typeof __re.source === "undefined") { - throw new Test262Error('#5: __re = new RegExp(1, new Object("gi")); typeof __re.source !== "undefined"'); -} +assert.sameValue(__re.ignoreCase, true, 'The value of __re.ignoreCase is expected to be true'); +assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false'); +assert.sameValue(__re.global, true, 'The value of __re.global is expected to be true'); +assert.sameValue(__re.lastIndex, 0, 'The value of __re.lastIndex is expected to be 0'); +assert.notSameValue(typeof __re.source, "undefined", 'The value of typeof __re.source is not "undefined"'); diff --git a/test/built-ins/RegExp/S15.10.4.1_A9_T1.js b/test/built-ins/RegExp/S15.10.4.1_A9_T1.js index d0f78275b9..7822186d27 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A9_T1.js +++ b/test/built-ins/RegExp/S15.10.4.1_A9_T1.js @@ -9,11 +9,14 @@ es5id: 15.10.4.1_A9_T1 description: Pattern is "??" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("??") throw SyntaxError. Actual: ' + (new RegExp("??"))); + throw new Test262Error('#1.1: new RegExp("??") throw SyntaxError. Actual: ' + (new RegExp("??"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("??") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A9_T2.js b/test/built-ins/RegExp/S15.10.4.1_A9_T2.js index 27d6b1d2a7..70accff307 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A9_T2.js +++ b/test/built-ins/RegExp/S15.10.4.1_A9_T2.js @@ -9,11 +9,14 @@ es5id: 15.10.4.1_A9_T2 description: Pattern is "[{-z]" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("[{-z]") throw SyntaxError. Actual: ' + (new RegExp("[{-z]"))); + throw new Test262Error('#1.1: new RegExp("[{-z]") throw SyntaxError. Actual: ' + (new RegExp("[{-z]"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("[{-z]") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.4.1_A9_T3.js b/test/built-ins/RegExp/S15.10.4.1_A9_T3.js index fdbd53bdc1..eb63fa9237 100644 --- a/test/built-ins/RegExp/S15.10.4.1_A9_T3.js +++ b/test/built-ins/RegExp/S15.10.4.1_A9_T3.js @@ -9,11 +9,14 @@ es5id: 15.10.4.1_A9_T3 description: Pattern is "[a--z]" ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: new RegExp("[a--z]") throw SyntaxError. Actual: ' + (new RegExp("[a--z]"))); + throw new Test262Error('#1.1: new RegExp("[a--z]") throw SyntaxError. Actual: ' + (new RegExp("[a--z]"))); } catch (e) { - if ((e instanceof SyntaxError) !== true) { - throw new Test262Error('#1.2: new RegExp("[a--z]") throw SyntaxError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof SyntaxError, + true, + 'The result of evaluating (e instanceof SyntaxError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.5_A1.js b/test/built-ins/RegExp/S15.10.5_A1.js index dd819b1a26..501797536b 100644 --- a/test/built-ins/RegExp/S15.10.5_A1.js +++ b/test/built-ins/RegExp/S15.10.5_A1.js @@ -6,8 +6,4 @@ info: RegExp constructor has length property whose value is 2 es5id: 15.10.5_A1 description: Checking RegExp.length property ---*/ - -//CHECK#1 -if (RegExp.length !== 2) { - throw new Test262Error('#1: RegExp.length === 2. Actual: ' + (RegExp.length)); -} +assert.sameValue(RegExp.length, 2, 'The value of RegExp.length is expected to be 2'); diff --git a/test/built-ins/RegExp/S15.10.5_A2_T1.js b/test/built-ins/RegExp/S15.10.5_A2_T1.js index b8a6735263..969d3c3612 100644 --- a/test/built-ins/RegExp/S15.10.5_A2_T1.js +++ b/test/built-ins/RegExp/S15.10.5_A2_T1.js @@ -8,8 +8,8 @@ info: | es5id: 15.10.5_A2_T1 description: Checking Function.prototype.isPrototypeOf(RegExp) ---*/ - -//CHECK#1 -if (Function.prototype.isPrototypeOf(RegExp) !== true) { - throw new Test262Error('#1: Function.prototype.isPrototypeOf(RegExp) === true'); -} +assert.sameValue( + Function.prototype.isPrototypeOf(RegExp), + true, + 'Function.prototype.isPrototypeOf(RegExp) must return true' +); diff --git a/test/built-ins/RegExp/S15.10.5_A2_T2.js b/test/built-ins/RegExp/S15.10.5_A2_T2.js index 48a73f55d3..6efa1b112d 100644 --- a/test/built-ins/RegExp/S15.10.5_A2_T2.js +++ b/test/built-ins/RegExp/S15.10.5_A2_T2.js @@ -13,7 +13,4 @@ description: > Function.prototype.indicator = 1; - //CHECK#1 -if (RegExp.indicator !== 1) { - throw new Test262Error('#1: Function.prototype.indicator = 1; RegExp.indicator === 1. Actual: ' + (RegExp.indicator)); -} +assert.sameValue(RegExp.indicator, 1, 'The value of RegExp.indicator is expected to be 1'); diff --git a/test/built-ins/RegExp/S15.10.7_A1_T1.js b/test/built-ins/RegExp/S15.10.7_A1_T1.js index fd00972a3b..2b124a7899 100644 --- a/test/built-ins/RegExp/S15.10.7_A1_T1.js +++ b/test/built-ins/RegExp/S15.10.7_A1_T1.js @@ -7,11 +7,14 @@ es5id: 15.10.7_A1_T1 description: Checking if call of RegExp instance fails ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: /[^a]*/() throw TypeError. Actual: ' + (/[^a]*/())); + throw new Test262Error('#1.1: /[^a]*/() throw TypeError. Actual: ' + (/[^a]*/())); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: /[^a]*/() throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.7_A1_T2.js b/test/built-ins/RegExp/S15.10.7_A1_T2.js index 8ec9c87808..b17b946c65 100644 --- a/test/built-ins/RegExp/S15.10.7_A1_T2.js +++ b/test/built-ins/RegExp/S15.10.7_A1_T2.js @@ -7,11 +7,14 @@ es5id: 15.10.7_A1_T2 description: Checking if call of RegExp("a|b","g")() fails ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: RegExp("a|b","g")() throw TypeError. Actual: ' + (RegExp("a|b","g")())); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: RegExp("a|b","g")() throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.7_A2_T1.js b/test/built-ins/RegExp/S15.10.7_A2_T1.js index 71ac77d99a..a79de5f06b 100644 --- a/test/built-ins/RegExp/S15.10.7_A2_T1.js +++ b/test/built-ins/RegExp/S15.10.7_A2_T1.js @@ -7,11 +7,14 @@ es5id: 15.10.7_A2_T1 description: Checking if creating new RegExp instance fails ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: new /z/() throw TypeError. Actual: ' + (new /z/())); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new /z/() throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.7_A2_T2.js b/test/built-ins/RegExp/S15.10.7_A2_T2.js index 2c9826b221..addb1eeb2d 100644 --- a/test/built-ins/RegExp/S15.10.7_A2_T2.js +++ b/test/built-ins/RegExp/S15.10.7_A2_T2.js @@ -7,11 +7,14 @@ es5id: 15.10.7_A2_T2 description: Checking if creating "new RegExp" instance fails ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: new new RegExp throw TypeError. Actual: ' + (new new RegExp)); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new new RegExp throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/S15.10.7_A3_T1.js b/test/built-ins/RegExp/S15.10.7_A3_T1.js index 0dcb260299..8effced6ce 100644 --- a/test/built-ins/RegExp/S15.10.7_A3_T1.js +++ b/test/built-ins/RegExp/S15.10.7_A3_T1.js @@ -11,17 +11,11 @@ description: > var __re = /[^a]*/; -//CHECK#1 -if (typeof __re !== "object") { - throw new Test262Error('#1: __re = /[^a]*/; typeof __re === "object". Actual: ' + (typeof __re)); -} +assert.sameValue(typeof __re, "object", 'The value of `typeof __re` is expected to be "object"'); +assert.sameValue(__re.constructor, RegExp, 'The value of __re.constructor is expected to equal the value of RegExp'); -//CHECK#1 -if (__re.constructor !== RegExp) { - throw new Test262Error('#2: __re = /[^a]*/; __re.constructor === RegExp. Actual: ' + (__re.constructor)); -} - -//CHECK#3 -if ((__re instanceof RegExp) !== true) { - throw new Test262Error('#3: __re = /[^a]*/; (__re instanceof RegExp) === true'); -} +assert.sameValue( + __re instanceof RegExp, + true, + 'The result of evaluating (__re instanceof RegExp) is expected to be true' +); diff --git a/test/built-ins/RegExp/S15.10.7_A3_T2.js b/test/built-ins/RegExp/S15.10.7_A3_T2.js index 8e2c4f36bd..87c8008262 100644 --- a/test/built-ins/RegExp/S15.10.7_A3_T2.js +++ b/test/built-ins/RegExp/S15.10.7_A3_T2.js @@ -11,17 +11,11 @@ description: > var __re = new RegExp; -//CHECK#1 -if (typeof __re !== "object") { - throw new Test262Error('#1: __re = new RegExp; typeof __re === "object". Actual: ' + (typeof __re)); -} +assert.sameValue(typeof __re, "object", 'The value of `typeof __re` is expected to be "object"'); +assert.sameValue(__re.constructor, RegExp, 'The value of __re.constructor is expected to equal the value of RegExp'); -//CHECK#1 -if (__re.constructor !== RegExp) { - throw new Test262Error('#2: __re = new RegExp; __re.constructor === RegExp. Actual: ' + (__re.constructor)); -} - -//CHECK#3 -if ((__re instanceof RegExp) !== true) { - throw new Test262Error('#3: __re = new RegExp; (__re instanceof RegExp) === true'); -} +assert.sameValue( + __re instanceof RegExp, + true, + 'The result of evaluating (__re instanceof RegExp) is expected to be true' +); diff --git a/test/built-ins/RegExp/prototype/S15.10.5.1_A1.js b/test/built-ins/RegExp/prototype/S15.10.5.1_A1.js index bf40aa5576..35bb30fe8d 100644 --- a/test/built-ins/RegExp/prototype/S15.10.5.1_A1.js +++ b/test/built-ins/RegExp/prototype/S15.10.5.1_A1.js @@ -6,8 +6,4 @@ info: The RegExp has property prototype es5id: 15.10.5.1_A1 description: Checking RegExp.prototype property ---*/ - -//CHECK#1 -if (RegExp.hasOwnProperty('prototype') !== true) { - throw new Test262Error('#1: RegExp.hasOwnProperty(\'prototype\') === true'); -} +assert.sameValue(RegExp.hasOwnProperty('prototype'), true, 'RegExp.hasOwnProperty(\'prototype\') must return true'); diff --git a/test/built-ins/RegExp/prototype/S15.10.5.1_A2.js b/test/built-ins/RegExp/prototype/S15.10.5.1_A2.js index 20dba9e7e8..fb9c0efb57 100644 --- a/test/built-ins/RegExp/prototype/S15.10.5.1_A2.js +++ b/test/built-ins/RegExp/prototype/S15.10.5.1_A2.js @@ -6,23 +6,21 @@ info: The RegExp.prototype property has the attribute DontEnum es5id: 15.10.5.1_A2 description: Checking if enumerating the RegExp.prototype property fails ---*/ +assert.sameValue(RegExp.hasOwnProperty('prototype'), true, 'RegExp.hasOwnProperty(\'prototype\') must return true'); -//CHECK#0 -if (RegExp.hasOwnProperty('prototype') !== true) { - throw new Test262Error('#0: RegExp.hasOwnProperty(\'prototype\') === true'); -} +assert.sameValue( + RegExp.propertyIsEnumerable('prototype'), + false, + 'RegExp.propertyIsEnumerable(\'prototype\') must return false' +); - //CHECK#1 -if (RegExp.propertyIsEnumerable('prototype') !== false) { - throw new Test262Error('#1: RegExp.propertyIsEnumerable(\'prototype\') === false'); -} - - //CHECK#2 var count=0; for (var p in RegExp){ - if (p==="prototype") count++; + if (p==="prototype") { + count++; + } } -if (count !== 0) { - throw new Test262Error('#2: count=0; for (p in RegExp){ if (p==="prototype") count++; } count === 0. Actual: ' + (count)); -} +assert.sameValue(count, 0, 'The value of count is expected to be 0'); + +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/S15.10.5.1_A3.js b/test/built-ins/RegExp/prototype/S15.10.5.1_A3.js index f8ff881368..a4c4c01eaf 100644 --- a/test/built-ins/RegExp/prototype/S15.10.5.1_A3.js +++ b/test/built-ins/RegExp/prototype/S15.10.5.1_A3.js @@ -7,25 +7,22 @@ es5id: 15.10.5.1_A3 description: Checking if deleting the RegExp.prototype property fails includes: [propertyHelper.js] ---*/ - -//CHECK#0 -if (RegExp.hasOwnProperty('prototype') !== true) { - throw new Test262Error('#0: RegExp.hasOwnProperty(\'prototype\') === true'); -} +assert.sameValue(RegExp.hasOwnProperty('prototype'), true); verifyNotConfigurable(RegExp, "prototype"); -//CHECK#1 try { - if (delete RegExp.prototype !== false) { - throw new Test262Error('#1: delete RegExp.prototype === false'); - } + assert.sameValue(delete RegExp.prototype, false); } catch (e) { - if (e instanceof Test262Error) throw e; + if (e instanceof Test262Error) { + throw e; + } assert(e instanceof TypeError); } -//CHECK#2 if (RegExp.hasOwnProperty('prototype') !== true) { - throw new Test262Error('#2: delete RegExp.prototype; RegExp.hasOwnProperty(\'prototype\') === true'); + throw new Test262Error('#2: delete RegExp.prototype; RegExp.hasOwnProperty(\'prototype\') === true'); } + +// TODO: Convert to verifyProperty() format. +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/S15.10.5.1_A4.js b/test/built-ins/RegExp/prototype/S15.10.5.1_A4.js index 0b41ddc172..52f8d23922 100644 --- a/test/built-ins/RegExp/prototype/S15.10.5.1_A4.js +++ b/test/built-ins/RegExp/prototype/S15.10.5.1_A4.js @@ -7,17 +7,12 @@ es5id: 15.10.5.1_A4 description: Checking if varying the RegExp.prototype property fails includes: [propertyHelper.js] ---*/ - -//CHECK#1 -if (RegExp.hasOwnProperty('prototype') !== true) { - throw new Test262Error('#1: RegExp.hasOwnProperty(\'prototype\') === true'); -} +assert.sameValue(RegExp.hasOwnProperty('prototype'), true, 'RegExp.hasOwnProperty(\'prototype\') must return true'); var __obj = RegExp.prototype; verifyNotWritable(RegExp, "prototype", null, function(){return "shifted";}); -//CHECK#2 -if (RegExp.prototype !== __obj) { - throw new Test262Error('#2: __obj = RegExp.prototype; RegExp.prototype = function(){return "shifted";}; RegExp.prototype === __obj. Actual: ' + (RegExp.prototype)); -} +assert.sameValue(RegExp.prototype, __obj, 'The value of RegExp.prototype is expected to equal the value of __obj'); + +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/S15.10.6.1_A1_T1.js b/test/built-ins/RegExp/prototype/S15.10.6.1_A1_T1.js index 8a5656f8f5..afdbd50bc5 100644 --- a/test/built-ins/RegExp/prototype/S15.10.6.1_A1_T1.js +++ b/test/built-ins/RegExp/prototype/S15.10.6.1_A1_T1.js @@ -8,8 +8,8 @@ info: | es5id: 15.10.6.1_A1_T1 description: Compare RegExp.prototype.constructor with RegExp ---*/ - -//CHECK#1 -if (RegExp.prototype.constructor !== RegExp) { - throw new Test262Error('#1: RegExp.prototype.constructor === RegExp. Actual: ' + (RegExp.prototype.constructor)); -} +assert.sameValue( + RegExp.prototype.constructor, + RegExp, + 'The value of RegExp.prototype.constructor is expected to equal the value of RegExp' +); diff --git a/test/built-ins/RegExp/prototype/S15.10.6.1_A1_T2.js b/test/built-ins/RegExp/prototype/S15.10.6.1_A1_T2.js index 8042493a9c..f67e6eab55 100644 --- a/test/built-ins/RegExp/prototype/S15.10.6.1_A1_T2.js +++ b/test/built-ins/RegExp/prototype/S15.10.6.1_A1_T2.js @@ -15,12 +15,14 @@ var __FACTORY = RegExp.prototype.constructor; var __instance = new __FACTORY; -//CHECK#1 -if ((__instance instanceof RegExp) !== true) { - throw new Test262Error('#1: __FACTORY = RegExp.prototype.constructor; __instance = new __FACTORY; (__instance instanceof RegExp) === true'); -} +assert.sameValue( + __instance instanceof RegExp, + true, + 'The result of evaluating (__instance instanceof RegExp) is expected to be true' +); -//CHECK#2 -if (__instance.constructor !== RegExp) { - throw new Test262Error('#2: __FACTORY = RegExp.prototype.constructor; __instance = new __FACTORY; __instance.constructor === RegExp. Actual: ' + (__instance.constructor)); -} +assert.sameValue( + __instance.constructor, + RegExp, + 'The value of __instance.constructor is expected to equal the value of RegExp' +); diff --git a/test/built-ins/RegExp/prototype/S15.10.6_A1_T1.js b/test/built-ins/RegExp/prototype/S15.10.6_A1_T1.js index ff18c6537e..b7ae652994 100644 --- a/test/built-ins/RegExp/prototype/S15.10.6_A1_T1.js +++ b/test/built-ins/RegExp/prototype/S15.10.6_A1_T1.js @@ -8,8 +8,8 @@ info: | es5id: 15.10.6_A1_T1 description: Checking Object.prototype.isPrototypeOf(RegExp.prototype) ---*/ - -//CHECK#1 -if (Object.prototype.isPrototypeOf(RegExp.prototype) !== true) { - throw new Test262Error('#1: Object.prototype.isPrototypeOf(RegExp.prototype) === true'); -} +assert.sameValue( + Object.prototype.isPrototypeOf(RegExp.prototype), + true, + 'Object.prototype.isPrototypeOf(RegExp.prototype) must return true' +); diff --git a/test/built-ins/RegExp/prototype/S15.10.6_A1_T2.js b/test/built-ins/RegExp/prototype/S15.10.6_A1_T2.js index cfdc591c89..bf215685f2 100644 --- a/test/built-ins/RegExp/prototype/S15.10.6_A1_T2.js +++ b/test/built-ins/RegExp/prototype/S15.10.6_A1_T2.js @@ -13,7 +13,4 @@ description: > Object.prototype.indicator = 1; -//CHECK#1 -if (RegExp.prototype.indicator !== 1) { - throw new Test262Error('#1: Object.prototype.indicator = 1; RegExp.prototype.indicator === 1. Actual: ' + (RegExp.prototype.indicator)); -} +assert.sameValue(RegExp.prototype.indicator, 1, 'The value of RegExp.prototype.indicator is expected to be 1'); diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A10.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A10.js index 100263292d..94a8fb7296 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A10.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A10.js @@ -7,17 +7,20 @@ es5id: 15.10.6.2_A10 description: Checking if varying the RegExp.prototype.exec.length property fails includes: [propertyHelper.js] ---*/ - -//CHECK#1 -if (RegExp.prototype.exec.hasOwnProperty('length') !== true) { - throw new Test262Error('#1: RegExp.prototype.exec.hasOwnProperty(\'length\') === true'); -} +assert.sameValue( + RegExp.prototype.exec.hasOwnProperty('length'), + true, + 'RegExp.prototype.exec.hasOwnProperty(\'length\') must return true' +); var __obj = RegExp.prototype.exec.length; verifyNotWritable(RegExp.prototype.exec, "length", null, function(){return "shifted";}); -//CHECK#2 -if (RegExp.prototype.exec.length !== __obj) { - throw new Test262Error('#2: __obj = RegExp.prototype.exec.length; RegExp.prototype.exec.length = function(){return "shifted";}; RegExp.prototype.exec.length === __obj. Actual: ' + (RegExp.prototype.exec.length)); -} +assert.sameValue( + RegExp.prototype.exec.length, + __obj, + 'The value of RegExp.prototype.exec.length is expected to equal the value of __obj' +); + +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A11.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A11.js index ec10191ecc..63387fde8a 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A11.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A11.js @@ -6,13 +6,10 @@ info: The length property of the exec method is 1 es5id: 15.10.6.2_A11 description: Checking RegExp.prototype.exec.length ---*/ +assert.sameValue( + RegExp.prototype.exec.hasOwnProperty("length"), + true, + 'RegExp.prototype.exec.hasOwnProperty("length") must return true' +); -//CHECK#1 -if (RegExp.prototype.exec.hasOwnProperty("length") !== true) { - throw new Test262Error('#1: RegExp.prototype.exec.hasOwnProperty(\'length\') === true'); -} - -//CHECK#2 -if (RegExp.prototype.exec.length !== 1) { - throw new Test262Error('#2: RegExp.prototype.exec.length === 1. Actual: ' + (RegExp.prototype.exec.length)); -} +assert.sameValue(RegExp.prototype.exec.length, 1, 'The value of RegExp.prototype.exec.length is expected to be 1'); diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A12.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A12.js index fa70d31eba..070ae578c7 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A12.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A12.js @@ -9,9 +9,5 @@ description: Checking RegExp.prototype.exec (/foo/).test('xfoox'); var match = new RegExp('(.|\r|\n)*','').exec()[0]; -if (match === 'xfoox') { - throw new Test262Error('#1: regExp.exec() leaks match globally'); -} -if (match !== 'undefined') { - throw new Test262Error('#2: regExp.exec() must coerce absent first arg to "undefined"'); -} +assert.notSameValue(match, 'xfoox', 'The value of match is not "xfoox"'); +assert.sameValue(match, 'undefined', 'The value of match is expected to be "undefined"'); diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T1.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T1.js index 159f0f1325..ba5e3111c6 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T1.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T1.js @@ -15,29 +15,34 @@ var __expected = ["1"]; __expected.index=0; __expected.input="123"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /1|12/.exec("123"); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /1|12/.exec("123"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /1|12/.exec("123"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /1|12/.exec("123"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /1|12/.exec("123"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T10.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T10.js index c8aca865bf..4fc06121c4 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T10.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T10.js @@ -15,29 +15,34 @@ var __expected = ["1"]; __expected.index=0; __expected.input="1.01"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /1|12/.exec(1.01); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /1|12/.exec(1.01); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /1|12/.exec(1.01); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /1|12/.exec(1.01); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /1|12/.exec(1.01); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T11.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T11.js index 4bcd3c4cb9..b832e72924 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T11.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T11.js @@ -15,29 +15,34 @@ var __expected = ["12"]; __expected.index=3; __expected.input="1.012"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /2|12/.exec(new Number(1.012)); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /2|12/.exec(new Number(1.012)); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /2|12/.exec(new Number(1.012)); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /2|12/.exec(new Number(1.012)); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /2|12/.exec(new Number(1.012)); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T12.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T12.js index fe6bc48a6c..0560c13ecf 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T12.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T12.js @@ -17,29 +17,34 @@ var __expected = [".14"]; __expected.index=1; __expected.input=String(Math.PI); -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /\\.14/.exec({toString:function(){return Math.PI}}); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /\\.14/.exec({toString:function(){return Math.PI}}); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /\\.14/.exec({toString:function(){return Math.PI}}); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /\\.14/.exec({toString:function(){return Math.PI}}); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /\\.14/.exec({toString:function(){return Math.PI}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T13.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T13.js index 646b9b7135..37526c32d0 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T13.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T13.js @@ -15,29 +15,34 @@ var __expected = ["tr"]; __expected.index=0; __expected.input="true"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /t[a-b|q-s]/.exec(true); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /t[a-b|q-s]/.exec(true); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /t[a-b|q-s]/.exec(true); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /t[a-b|q-s]/.exec(true); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /t[a-b|q-s]/.exec(true); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T14.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T14.js index e1b240b6f1..41cdc69324 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T14.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T14.js @@ -15,29 +15,34 @@ var __expected = ["se"]; __expected.index=3; __expected.input="false"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /AL|se/.exec(new Boolean); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /AL|se/.exec(new Boolean); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /AL|se/.exec(new Boolean); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /AL|se/.exec(new Boolean); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /AL|se/.exec(new Boolean); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T15.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T15.js index 1ed3bf8da3..22b4e9c173 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T15.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T15.js @@ -15,29 +15,34 @@ var __expected = ["ls"]; __expected.index=2; __expected.input="false"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /LS/i.exec({toString:function(){return false}}); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /LS/i.exec({toString:function(){return false}}); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /LS/i.exec({toString:function(){return false}}); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /LS/i.exec({toString:function(){return false}}); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /LS/i.exec({toString:function(){return false}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T16.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T16.js index 6884850a02..87939ae2ef 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T16.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T16.js @@ -10,6 +10,4 @@ description: RegExp is /undefined/ and call exec() without arguments ---*/ var __re = /undefined/.exec()[0]; -if (__re !== "undefined") { - throw new Test262Error('#1: /undefined/.exec()[0] === "undefined". Actual: ' + (__re)); -} +assert.sameValue(__re, "undefined", 'The value of __re is expected to be "undefined"'); diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T17.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T17.js index 71d43113b7..77f0e20a46 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T17.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T17.js @@ -15,29 +15,34 @@ var __expected = ["ll"]; __expected.index=2; __expected.input="null"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /ll|l/.exec(null); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /ll|l/.exec(null); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /ll|l/.exec(null); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /ll|l/.exec(null); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /ll|l/.exec(null); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T18.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T18.js index b7585d705b..2541832e0e 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T18.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T18.js @@ -15,29 +15,34 @@ var __expected = ["nd"]; __expected.index=1; __expected.input="undefined"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /nd|ne/.exec(undefined); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /nd|ne/.exec(undefined); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /nd|ne/.exec(undefined); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /nd|ne/.exec(undefined); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /nd|ne/.exec(undefined); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T19.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T19.js index e6b0e776e0..e6fe179255 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T19.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T19.js @@ -15,29 +15,34 @@ var __expected = ["e"]; __expected.index=3; __expected.input="undefined"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /e{1}/.exec(void 0); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /e{1}/.exec(void 0); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /e{1}/.exec(void 0); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /e{1}/.exec(void 0); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /e{1}/.exec(void 0); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T2.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T2.js index d4cc27a10b..fbacb45f40 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T2.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T2.js @@ -16,29 +16,34 @@ var __expected = ["123", "1", "1", undefined, "23", undefined, "23"]; __expected.index=0; __expected.input="123"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __re = /((1)|(12))((3)|(23))/; __executed = __re.exec(new String("123"));} (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /((1)|(12))((3)|(23))/; __executed = __re.exec(new String("123"));} __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /((1)|(12))((3)|(23))/; __executed = __re.exec(new String("123"));} __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /((1)|(12))((3)|(23))/; __executed = __re.exec(new String("123"));} __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /((1)|(12))((3)|(23))/; __executed = __re.exec(new String("123"));} __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T20.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T20.js index a84e2ee623..359784952a 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T20.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T20.js @@ -15,31 +15,36 @@ var __expected = ["ed"]; __expected.index=7; __expected.input="undefined"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /[a-f]d/.exec(x); var x; (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[a-f]d/.exec(x); var x; __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[a-f]d/.exec(x); var x; __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[a-f]d/.exec(x); var x; __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[a-f]d/.exec(x); var x; __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } var x; diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T21.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T21.js index 0e379c1bb6..8383d2a57b 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T21.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T21.js @@ -15,29 +15,34 @@ var __expected = ["un"]; __expected.index=0; __expected.input="undefined"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /[a-z]n/.exec(function(){}()); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /[a-z]n/.exec(function(){}()); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /[a-z]n/.exec(function(){}()); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /[a-z]n/.exec(function(){}()); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /[a-z]n/.exec(function(){}()); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T3.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T3.js index da8454b2f3..fa168fa29b 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T3.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T3.js @@ -15,29 +15,34 @@ var __expected = ["abcde"]; __expected.index=0; __expected.input="abcdefghi"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /a[a-z]{2,4}/.exec(new Object("abcdefghi")); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a[a-z]{2,4}/.exec(new Object("abcdefghi")); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a[a-z]{2,4}/.exec(new Object("abcdefghi")); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a[a-z]{2,4}/.exec(new Object("abcdefghi")); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a[a-z]{2,4}/.exec(new Object("abcdefghi")); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T4.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T4.js index 75b4929420..dcd9f55a65 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T4.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T4.js @@ -17,29 +17,34 @@ var __expected = ["abc"]; __expected.index=0; __expected.input="abcdefghi"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /a[a-z]{2,4}?/.exec({toString:function(){return "abcdefghi"}}); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /a[a-z]{2,4}?/.exec({toString:function(){return "abcdefghi"}}); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /a[a-z]{2,4}?/.exec({toString:function(){return "abcdefghi"}}); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /a[a-z]{2,4}?/.exec({toString:function(){return "abcdefghi"}}); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /a[a-z]{2,4}?/.exec({toString:function(){return "abcdefghi"}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T5.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T5.js index 0800644e25..163b53f425 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T5.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T5.js @@ -18,29 +18,34 @@ var __expected = ["aaba", "ba"]; __expected.index=0; __expected.input="aabaac"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return "aabaac";}}); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return "aabaac";}}); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return "aabaac";}}); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return "aabaac";}}); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return "aabaac";}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T6.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T6.js index d933c1da5e..6a965c74c8 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T6.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T6.js @@ -17,29 +17,34 @@ var __expected = ["zaacbbbcac", "z", "ac", "a", undefined, "c"]; __expected.index=0; __expected.input="zaacbbbcac"; -//CHECK#0 -if ((__executed instanceof Array) !== true) { - throw new Test262Error('#0: __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return "zaacbbbcac"})()); (__executed instanceof Array) === true'); -} +assert.sameValue( + __executed instanceof Array, + true, + 'The result of evaluating (__executed instanceof Array) is expected to be true' +); -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return "zaacbbbcac"})()); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return "zaacbbbcac"})()); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return "zaacbbbcac"})()); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return "zaacbbbcac"})()); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T7.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T7.js index eb5bc69ba8..879b78ef39 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T7.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T7.js @@ -11,11 +11,10 @@ description: > /[a-z]/ ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: /[a-z]/.exec({toString:function(){throw "intostr"}}) throw "intostr". Actual: ' + (/[a-z]/.exec({toString:function(){throw "intostr"}}))); + throw new Test262Error('#1.1: /[a-z]/.exec({toString:function(){throw "intostr"}}) throw "intostr". Actual: ' + (/[a-z]/.exec({toString:function(){throw "intostr"}}))); } catch (e) { - if (e !== "intostr") { - throw new Test262Error('#1.2: /[a-z]/.exec({toString:function(){throw "intostr"}}) throw "intostr". Actual: ' + (e)); - } + assert.sameValue(e, "intostr", 'The value of e is expected to be "intostr"'); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T8.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T8.js index 1306f3bb5b..93e0e4e9d6 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T8.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T8.js @@ -11,11 +11,10 @@ description: > and RegExp is /[a-z]/ ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[a-z]/.exec({toString:void 0, valueOf:function(){throw "invalof"}}) throw "invalof". Actual: ' + (/[a-z]/.exec({toString:void 0, valueOf:function(){throw "invalof"}}))); } catch (e) { - if (e !== "invalof") { - throw new Test262Error('#1.2: /[a-z]/.exec({toString:void 0, valueOf:function(){throw "invalof"}}) throw "invalof". Actual: ' + (e)); - } + assert.sameValue(e, "invalof", 'The value of e is expected to be "invalof"'); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T9.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T9.js index e1d6671dc8..fbd38a411d 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T9.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A1_T9.js @@ -11,10 +11,7 @@ description: String is undefined variable and RegExp is /1|12/ var __string; -//CHECK#1 var __re = /1|12/; -if (__re.exec(__string) !== null) { - throw new Test262Error('#1: var __string; /1|12/.exec(__string) === null; function __string(){}. Actual: ' + (__re)); -} +assert.sameValue(__re.exec(__string), null, '__re.exec() must return null'); -function __string(){}; +function __string(){} diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T1.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T1.js index dfd0062a1c..e3e97cf289 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T1.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T1.js @@ -13,11 +13,14 @@ var __instance = new Object; __instance.exec = RegExp.prototype.exec; -//CHECK#1 try { - throw new Test262Error('#1.1: __instance = new Object; __instance.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (__instance.exec("message to investigate"))); + throw new Test262Error('#1.1: __instance = new Object; __instance.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (__instance.exec("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = new Object; __instance.exec = RegExp.prototype.exec. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T10.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T10.js index 73cb28d012..af29cad947 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T10.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T10.js @@ -11,11 +11,14 @@ description: The tested object is undefined var exec = RegExp.prototype.exec; -//CHECK#1 try { - throw new Test262Error('#1.1: exec = RegExp.prototype.exec; exec("message to investigate"). Actual: ' + (exec("message to investigate"))); + throw new Test262Error('#1.1: exec = RegExp.prototype.exec; exec("message to investigate"). Actual: ' + (exec("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: exec = RegExp.prototype.exec; exec("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T2.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T2.js index 2530e6bfb8..518de880df 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T2.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T2.js @@ -13,12 +13,15 @@ var __instance = Math; __instance.exec = RegExp.prototype.exec; -//CHECK#1 try { __instance.exec("message to investigate"); - throw new Test262Error('#1.1: __instance = Math; __instance.exec = RegExp.prototype.exec; __instance.exec("message to investigate")'); + throw new Test262Error('#1.1: __instance = Math; __instance.exec = RegExp.prototype.exec; __instance.exec("message to investigate")'); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = Math; __instance.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T3.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T3.js index 38a52db787..e5e6116619 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T3.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T3.js @@ -11,14 +11,17 @@ description: The tested object is function object __instance.exec = RegExp.prototype.exec; -//CHECK#1 try { __instance.exec("message to investigate"); - throw new Test262Error('#1.1: __instance.exec = RegExp.prototype.exec; __instance.exec("message to investigate"); function __instance(){}'); + throw new Test262Error('#1.1: __instance.exec = RegExp.prototype.exec; __instance.exec("message to investigate"); function __instance(){}'); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance.exec = RegExp.prototype.exec; __instance.exec("message to investigate"); function __instance(){}. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } function __instance(){}; + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T4.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T4.js index 579cc12717..469f0c548e 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T4.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T4.js @@ -13,11 +13,14 @@ var __instance = new String("[a-b]"); __instance.exec = RegExp.prototype.exec; -//CHECK#1 try { - throw new Test262Error('#1.1: __instance = new String("[a-b]"); __instance.exec = RegExp.prototype.exec; exec("message to investigate"). Actual: ' + (__instance.exec("message to investigate"))); + throw new Test262Error('#1.1: __instance = new String("[a-b]"); __instance.exec = RegExp.prototype.exec; exec("message to investigate"). Actual: ' + (__instance.exec("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = new String("[a-b]"); __instance.exec = RegExp.prototype.exec; exec("message to investigate"). Actual: ' + (e)); - } - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); + } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T5.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T5.js index cbc2a67257..d45fd3020b 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T5.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T5.js @@ -13,11 +13,14 @@ var __instance = new Boolean(false); __instance.exec = RegExp.prototype.exec; -//CHECK#1 try { throw new Test262Error('#1.1: __instance = new Boolean(false); __instance.exec = RegExp.prototype.exec; exec("message to investigate"). Actual: ' + (__instance.exec("message to investigate"))); } catch (e) { - if ((e instanceof TypeError !== true)) { - throw new Test262Error('#1.2: __instance = new Boolean(false); __instance.exec = RegExp.prototype.exec; exec("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T6.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T6.js index 592d8b002d..64dd325580 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T6.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T6.js @@ -13,11 +13,14 @@ var __instance = new Number(1.0); __instance.exec = RegExp.prototype.exec; -//CHECK#1 try { - throw new Test262Error('#1.1: __instance = new Number(1.0); __instance.exec = RegExp.prototype.exec; __instance["exec"]("message to investigate"). Actual: ' + (__instance["exec"]("message to investigate"))); + throw new Test262Error('#1.1: __instance = new Number(1.0); __instance.exec = RegExp.prototype.exec; __instance["exec"]("message to investigate"). Actual: ' + (__instance["exec"]("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = new Number(1.0); __instance.exec = RegExp.prototype.exec; __instance["exec"]("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T7.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T7.js index da128ca9e1..560f166f79 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T7.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T7.js @@ -13,11 +13,14 @@ var __instance = false; Object.prototype.exec = RegExp.prototype.exec; -//CHECK#1 try { - throw new Test262Error('#1.1: __instance = false; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (__instance.exec("message to investigate"))); + throw new Test262Error('#1.1: __instance = false; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (__instance.exec("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = false; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T8.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T8.js index 08b9ef64a3..49fd82572e 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T8.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T8.js @@ -13,11 +13,14 @@ var __instance = "."; Object.prototype.exec = RegExp.prototype.exec; -//CHECK#1 try { - throw new Test262Error('#1.1: __instance = "."; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (__instance.exec("message to investigate"))); + throw new Test262Error('#1.1: __instance = "."; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (__instance.exec("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = "."; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T9.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T9.js index 0bdd724b1e..f64c131e41 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T9.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A2_T9.js @@ -13,11 +13,14 @@ var __instance = 1.0; Object.prototype.exec = RegExp.prototype.exec; -//CHECK#1 try { - throw new Test262Error('#1.1: __instance = 1.0; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (__instance.exec("message to investigate"))); + throw new Test262Error('#1.1: __instance = 1.0; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (__instance.exec("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = 1.0; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T1.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T1.js index ae09af0c40..d753472db4 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T1.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T1.js @@ -25,14 +25,16 @@ do{ } }while(true); -//CHECK#1 -if (__expected.length !== __matched.length) { - throw new Test262Error('#1: __executed = /(?:ab|cd)\\d?/g.exec("ab cd2 ab34 cd"); __matched.length === ' + (__expected.length) + '.Actual: ' + (__matched.length)); -} +assert.sameValue( + __expected.length, + __matched.length, + 'The value of __expected.length is expected to equal the value of __matched.length' +); -//CHECK#2 for(var index=0; index<__expected.length; index++) { - if (__expected[index] !== __matched[index]) { - throw new Test262Error('#2: __executed = /(?:ab|cd)\\d?/g.exec("ab cd2 ab34 cd"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]); - } + assert.sameValue( + __expected[index], + __matched[index], + 'The value of __expected[index] is expected to equal the value of __matched[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T2.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T2.js index 1654c80a6d..65a8659774 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T2.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T2.js @@ -134,21 +134,18 @@ var __the__raven = " Once upon a midnight dreary, while I pondered weak and wear "And my soul from out that shadow that lies floating on the floor" + "Shall be lifted - nevermore!" -var NEVERMORE=11; - +var NEVERMORE=11; + var __re = /[Nn]evermore/g; var __matched=0; do{ var __executed = __re.exec(__the__raven); if (__executed !== null) { - __matched++; + __matched++; } else { - break; + break; } }while(1); -//CHECK#1 -if (__matched !== NEVERMORE) { - throw new Test262Error('#1: __re = /[Nn]evermore/g; __executed = __re.exec(__the__raven)'+__matched); -} +assert.sameValue(__matched, NEVERMORE, 'The value of __matched is expected to equal the value of NEVERMORE'); diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T3.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T3.js index 5446619929..1b98fa179a 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T3.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T3.js @@ -134,21 +134,22 @@ var __the__raven = " Once upon a midnight dreary, while I pondered weak and wear "And my soul from out that shadow that lies floating on the floor" + "Shall be lifted - nevermore!" -var NEVERMORE_AND_EVERMORE=12; - +var NEVERMORE_AND_EVERMORE=12; + var __re = /[Nn]?evermore/g; var __matched=0; do{ var __executed = __re.exec(__the__raven); if (__executed !== null) { - __matched++; + __matched++; } else { - break; + break; } }while(1); -//CHECK#1 -if (__matched !== NEVERMORE_AND_EVERMORE) { - throw new Test262Error('#1: __re = /[Nn]?evermore/g; __executed = __re.exec(__the__raven)'+__matched); -} +assert.sameValue( + __matched, + NEVERMORE_AND_EVERMORE, + 'The value of __matched is expected to equal the value of NEVERMORE_AND_EVERMORE' +); diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T4.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T4.js index 6e0760ed5f..b794dd4e4b 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T4.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T4.js @@ -136,21 +136,22 @@ var __the__raven = " Once upon a midnight dreary, while I pondered weak and wear "And my soul from out that shadow that lies floating on the floor" + "Shall be lifted - nevermore!" -var ALL_THE_HOPELESS_MORE=18; - +var ALL_THE_HOPELESS_MORE=18; + var __re = /([Nn]?ever|([Nn]othing\s{1,}))more/g; var __matched=0; do{ var __executed = __re.exec(__the__raven); if (__executed !== null) { - __matched++; + __matched++; } else { - break; + break; } }while(1); -//CHECK#1 -if (__matched !== ALL_THE_HOPELESS_MORE) { - throw new Test262Error('#1: __re = /([Nn]?ever|([Nn]othing\\s{1,}))more/g; __executed = __re.exec(__the__raven)'+__matched); -} +assert.sameValue( + __matched, + ALL_THE_HOPELESS_MORE, + 'The value of __matched is expected to equal the value of ALL_THE_HOPELESS_MORE' +); diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T5.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T5.js index 5b6458bec5..51c804d19e 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T5.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T5.js @@ -19,20 +19,22 @@ var __expected = ["123","456","789"]; do{ var __executed = __re.exec("123 456 789"); if (__executed !== null) { - __matched.push(__executed[0]); + __matched.push(__executed[0]); } else { - break; + break; } }while(true); -//CHECK#1 -if (__expected.length !== __matched.length) { - throw new Test262Error('#1: __executed = /\\d+/g.exec("123 456 789"); __matched.length === ' + (__expected.length) + '.Actual: ' + (__matched.length)); -} +assert.sameValue( + __expected.length, + __matched.length, + 'The value of __expected.length is expected to equal the value of __matched.length' +); -//CHECK#2 for(var index=0; index<__expected.length; index++) { - if (__expected[index] !== __matched[index]) { - throw new Test262Error('#2: __executed = /\\d+/g.exec("123 456 789"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]); - } + assert.sameValue( + __expected[index], + __matched[index], + 'The value of __expected[index] is expected to equal the value of __matched[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T6.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T6.js index 6a26dde712..4e22baffa0 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T6.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T6.js @@ -19,20 +19,22 @@ var __expected = ["123","456","789"]; do{ var __executed = __re.exec("123 456 789"); if (__executed !== null) { - __matched.push(__executed[0]); + __matched.push(__executed[0]); } else { - break; + break; } }while(true); -//CHECK#1 -if (__expected.length !== __matched.length) { - throw new Test262Error('#1: __executed = /(\\d+)/g.exec("123 456 789"); __matched.length === ' + (__expected.length) + '.Actual: ' + (__matched.length)); -} +assert.sameValue( + __expected.length, + __matched.length, + 'The value of __expected.length is expected to equal the value of __matched.length' +); -//CHECK#2 for(var index=0; index<__expected.length; index++) { - if (__expected[index] !== __matched[index]) { - throw new Test262Error('#2: __executed = /(\\d+)/g.exec("123 456 789"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]); - } + assert.sameValue( + __expected[index], + __matched[index], + 'The value of __expected[index] is expected to equal the value of __matched[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T7.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T7.js index 591402d5cd..c17d4d0b1b 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T7.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A3_T7.js @@ -19,20 +19,22 @@ var __expected = ["123","123","123","123","123","123","123","123","123","123"]; do{ var __executed = __re.exec("123 456 789"); if (__executed !== null) { - __matched.push(__executed[0]); + __matched.push(__executed[0]); } else { - break; + break; } }while(__matched.length<10); -//CHECK#1 -if (__expected.length !== __matched.length) { - throw new Test262Error('#1: __executed = /\\d+/.exec("123 456 789"); __matched.length === ' + (__expected.length) + '.Actual: ' + (__matched.length)); -} +assert.sameValue( + __expected.length, + __matched.length, + 'The value of __expected.length is expected to equal the value of __matched.length' +); -//CHECK#2 for(var index=0; index<__expected.length; index++) { - if (__expected[index] !== __matched[index]) { - throw new Test262Error('#2: __executed = /\\d+/.exec("123 456 789"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]); - } + assert.sameValue( + __expected[index], + __matched[index], + 'The value of __expected[index] is expected to equal the value of __matched[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T1.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T1.js index 96d762ff2a..ae12154fd2 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T1.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T1.js @@ -17,26 +17,30 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } __re.lastIndex = 12; @@ -47,24 +51,28 @@ __expected = ["ab4"]; __expected.index = 17; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#5 -if (__executed.length !== __expected.length) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = 12; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#6 -if (__executed.index !== __expected.index) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = 12; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#7 -if (__executed.input !== __expected.input) { - throw new Test262Error('#7: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = 12; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#8 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = 12; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T10.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T10.js index ac3356294b..c39fc3d7d1 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T10.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T10.js @@ -19,26 +19,30 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } var __obj = {valueOf:function(){return 12;}}; @@ -51,24 +55,28 @@ __expected = ["ab4"]; __expected.index = 17; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#5 -if (__executed.length !== __expected.length) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __obj = {valueOf:function(){return 12;}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#6 -if (__executed.index !== __expected.index) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __obj = {valueOf:function(){return 12;}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#7 -if (__executed.input !== __expected.input) { - throw new Test262Error('#7: __re = /(?:ab|cd)\\d?/g; __obj = {valueOf:function(){return 12;}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#8 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#8: __re = /(?:ab|cd)\\d?/g; __obj = {valueOf:function(){return 12;}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T11.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T11.js index 809b410554..487e076942 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T11.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T11.js @@ -19,37 +19,40 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } var __obj = {valueOf:function(){throw "intoint";}}; __re.lastIndex = __obj; -//CHECK#5 try { throw new Test262Error('#5.1: __obj = {valueOf:function(){throw "intoint";}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42") throw "intoint". Actual: ' + (__re.exec("aacd2233ab12nm444ab42"))); } catch (e) { - if (e !== "intoint") { - throw new Test262Error('#5.2: __obj = {valueOf:function(){throw "intoint";}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42") throw "intoint". Actual: ' + (e)); - } + assert.sameValue(e, "intoint", 'The value of e is expected to be "intoint"'); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T12.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T12.js index 10bb154904..dc4afe7dbd 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T12.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T12.js @@ -20,26 +20,30 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } var __obj = {toString:function(){return 12;},valueOf:function(){return {};}}; @@ -52,24 +56,28 @@ __expected = ["ab4"]; __expected.index = 17; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#5 -if (__executed.length !== __expected.length) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __obj = {toString:function(){return 12;},valueOf:function(){return {};}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#6 -if (__executed.index !== __expected.index) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __obj = {toString:function(){return 12;},valueOf:function(){return {};}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#7 -if (__executed.input !== __expected.input) { - throw new Test262Error('#7: __re = /(?:ab|cd)\\d?/g; __obj = {toString:function(){return 12;},valueOf:function(){return {};}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#8 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#8: __re = /(?:ab|cd)\\d?/g; __obj = {toString:function(){return 12;},valueOf:function(){return {};}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T2.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T2.js index 4ec62baa4e..b1cd0fb527 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T2.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T2.js @@ -19,26 +19,30 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } __re.lastIndex = undefined; @@ -49,24 +53,28 @@ __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#5 -if (__executed.length !== __expected.length) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = undefined; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#6 -if (__executed.index !== __expected.index) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = undefined; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#7 -if (__executed.input !== __expected.input) { - throw new Test262Error('#7: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = undefined; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#8 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = undefined; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T3.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T3.js index d84c2086c6..ea73eed159 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T3.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T3.js @@ -17,26 +17,30 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } __re.lastIndex = void 0; @@ -47,24 +51,28 @@ __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#5 -if (__executed.length !== __expected.length) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = void 0; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#6 -if (__executed.index !== __expected.index) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = void 0; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#7 -if (__executed.input !== __expected.input) { - throw new Test262Error('#7: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = void 0; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#8 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = void 0; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T4.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T4.js index 56edc936d0..dc42cde963 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T4.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T4.js @@ -17,26 +17,30 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } __re.lastIndex = null; @@ -47,24 +51,28 @@ __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#5 -if (__executed.length !== __expected.length) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = null; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#6 -if (__executed.index !== __expected.index) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = null; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#7 -if (__executed.input !== __expected.input) { - throw new Test262Error('#7: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = null; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#8 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = null; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T5.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T5.js index 488c166100..9af3b5fbdd 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T5.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T5.js @@ -19,26 +19,30 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } __re.lastIndex = x; @@ -49,26 +53,30 @@ __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#5 -if (__executed.length !== __expected.length) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = x; __executed = __re.exec("aacd2233ab12nm444ab42"); var x; __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#6 -if (__executed.index !== __expected.index) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = x; __executed = __re.exec("aacd2233ab12nm444ab42"); var x; __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#7 -if (__executed.input !== __expected.input) { - throw new Test262Error('#7: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = x; __executed = __re.exec("aacd2233ab12nm444ab42"); var x; __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#8 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = x; __executed = __re.exec("aacd2233ab12nm444ab42"); var x; __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } var x; diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T6.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T6.js index ef80d4e2ec..1edadb2aed 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T6.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T6.js @@ -17,26 +17,30 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } __re.lastIndex = false; @@ -47,24 +51,28 @@ __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#5 -if (__executed.length !== __expected.length) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = false; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#6 -if (__executed.index !== __expected.index) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = false; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#7 -if (__executed.input !== __expected.input) { - throw new Test262Error('#7: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = false; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#8 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = false; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T7.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T7.js index 171d394684..7434828e9f 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T7.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T7.js @@ -19,26 +19,30 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } __re.lastIndex = Math.NaN; @@ -49,24 +53,28 @@ __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#5 -if (__executed.length !== __expected.length) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = Math.NaN; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#6 -if (__executed.index !== __expected.index) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = Math.NaN; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#7 -if (__executed.input !== __expected.input) { - throw new Test262Error('#7: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = Math.NaN; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#8 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#8: __re = /(?:ab|cd)\\d?/g; re.lastIndex = Math.NaN; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T8.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T8.js index eda2aa1049..2f5e6c6016 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T8.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T8.js @@ -17,26 +17,30 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } __re.lastIndex = "12"; @@ -47,24 +51,28 @@ __expected = ["ab4"]; __expected.index = 17; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#5 -if (__executed.length !== __expected.length) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = "12"; __executed = __re.exec("aacd2233ab12nm444ab42");__executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#6 -if (__executed.index !== __expected.index) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = "12"; __executed = __re.exec("aacd2233ab12nm444ab42");__executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#7 -if (__executed.input !== __expected.input) { - throw new Test262Error('#7: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = "12"; __executed = __re.exec("aacd2233ab12nm444ab42");__executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#8 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = "12"; __executed = __re.exec("aacd2233ab12nm444ab42");__executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T9.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T9.js index aefb8ca294..981be82d67 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T9.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A4_T9.js @@ -19,26 +19,30 @@ var __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } __re.lastIndex = "eleven"; @@ -49,24 +53,28 @@ __expected = ["cd2"]; __expected.index = 2; __expected.input = "aacd2233ab12nm444ab42"; -//CHECK#5 -if (__executed.length !== __expected.length) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = "eleven"; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#6 -if (__executed.index !== __expected.index) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = "eleven"; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#7 -if (__executed.input !== __expected.input) { - throw new Test262Error('#7: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = "eleven"; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#8 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#8: __re = /(?:ab|cd)\\d?/g;__re.lastIndex = "eleven"; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T1.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T1.js index c37fd2d18f..52309d9842 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T1.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T1.js @@ -19,36 +19,33 @@ var __expected = ["ab4"]; __expected.index = 21; __expected.input = "aac1dz2233a1bz12nm444ab42"; -//CHECK#1 -if (__executed.length !== __expected.length) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aac1dz2233a1bz12nm444ab42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); -} +assert.sameValue( + __executed.length, + __expected.length, + 'The value of __executed.length is expected to equal the value of __expected.length' +); -//CHECK#2 -if (__executed.index !== __expected.index) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aac1dz2233a1bz12nm444ab42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); -} +assert.sameValue( + __executed.index, + __expected.index, + 'The value of __executed.index is expected to equal the value of __expected.index' +); -//CHECK#3 -if (__executed.input !== __expected.input) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aac1dz2233a1bz12nm444ab42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); -} +assert.sameValue( + __executed.input, + __expected.input, + 'The value of __executed.input is expected to equal the value of __expected.input' +); -//CHECK#4 for(var index=0; index<__expected.length; index++) { - if (__executed[index] !== __expected[index]) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aac1dz2233a1bz12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); - } + assert.sameValue( + __executed[index], + __expected[index], + 'The value of __executed[index] is expected to equal the value of __expected[index]' + ); } __executed = __re.exec("aacd22"); -//CHECK#5 -if (__executed) { - throw new Test262Error('#5: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd22"); __executed === true'); -} - -//CHECK#6 -if (__re.lastIndex !== 0) { - throw new Test262Error('#6: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd22"); __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); -} +assert(!__executed, 'The value of !__executed is expected to be true'); +assert.sameValue(__re.lastIndex, 0, 'The value of __re.lastIndex is expected to be 0'); diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T2.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T2.js index 16c8138d01..33cd5a955c 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T2.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T2.js @@ -14,12 +14,5 @@ var __re = /(?:ab|cd)\d?/g; __re.lastIndex=100; var __executed = __re.exec("aacd22 "); -//CHECK#1 -if (__executed) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=100; __executed = __re.exec("aacd22 "); __executed === true'); -} - -//CHECK#2 -if (__re.lastIndex !== 0) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=100; __executed = __re.exec("aacd22 "); __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); -} +assert(!__executed, 'The value of !__executed is expected to be true'); +assert.sameValue(__re.lastIndex, 0, 'The value of __re.lastIndex is expected to be 0'); diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T3.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T3.js index aa20880952..b718a9c349 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T3.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A5_T3.js @@ -14,25 +14,11 @@ var __re = /(?:ab|cd)\d?/g; __re.lastIndex=-1; var __executed = __re.exec("aacd22 "); -//CHECK#1 -if (__executed[0] !== "cd2") { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=-1; __executed = __re.exec("aacd22 "); __executed[0] === "cd2"'); -} - -//CHECK#2 -if (__re.lastIndex !== 5) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=-1; __executed = __re.exec("aacd22 "); __re.lastIndex === 5. Actual: ' + (__re.lastIndex)); -} +assert.sameValue(__executed[0], "cd2", 'The value of __executed[0] is expected to be "cd2"'); +assert.sameValue(__re.lastIndex, 5, 'The value of __re.lastIndex is expected to be 5'); __re.lastIndex=-100; __executed = __re.exec("aacd22 "); -//CHECK#3 -if (__executed[0] !== "cd2") { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=-1; __executed = __re.exec("aacd22 "); __re.lastIndex=-100; __executed = __re.exec("aacd22 "); __executed[0] === "cd2"'); -} - -//CHECK#4 -if (__re.lastIndex !== 5) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=-1; __executed = __re.exec("aacd22 "); __re.lastIndex=-100; __executed = __re.exec("aacd22 "); __re.lastIndex === 5. Actual: ' + (__re.lastIndex)); -} +assert.sameValue(__executed[0], "cd2", 'The value of __executed[0] is expected to be "cd2"'); +assert.sameValue(__re.lastIndex, 5, 'The value of __re.lastIndex is expected to be 5'); diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A6.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A6.js index ea6df7cbb5..5a1c02f3c5 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A6.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A6.js @@ -6,8 +6,8 @@ info: RegExp.prototype.exec has not prototype property es5id: 15.10.6.2_A6 description: Checking RegExp.prototype.exec.prototype ---*/ - -//CHECK#1 -if (RegExp.prototype.exec.prototype !== undefined) { - throw new Test262Error('#1: RegExp.prototype.exec.prototype === undefined. Actual: ' + (RegExp.prototype.exec.prototype)); -} +assert.sameValue( + RegExp.prototype.exec.prototype, + undefined, + 'The value of RegExp.prototype.exec.prototype is expected to equal undefined' +); diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A7.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A7.js index cbaa57ca83..f31ff8a2a2 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A7.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A7.js @@ -13,7 +13,11 @@ try { var __instance = new __FACTORY; throw new Test262Error('#1.1: __FACTORY = RegExp.prototype.exec throw TypeError. Actual: ' + (__instance)); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __FACTORY = RegExp.prototype.exec throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A8.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A8.js index d7a133327b..54a88c1d21 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A8.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A8.js @@ -8,24 +8,26 @@ description: > Checking if enumerating the RegExp.prototype.exec.length property fails ---*/ +assert.sameValue( + RegExp.prototype.exec.hasOwnProperty('length'), + true, + 'RegExp.prototype.exec.hasOwnProperty(\'length\') must return true' +); -//CHECK#0 -if (RegExp.prototype.exec.hasOwnProperty('length') !== true) { - throw new Test262Error('#0: RegExp.prototype.exec.hasOwnProperty(\'length\') === true'); -} +assert.sameValue( + RegExp.prototype.exec.propertyIsEnumerable('length'), + false, + 'RegExp.prototype.exec.propertyIsEnumerable(\'length\') must return false' +); - //CHECK#1 -if (RegExp.prototype.exec.propertyIsEnumerable('length') !== false) { - throw new Test262Error('#1: RegExp.prototype.exec.propertyIsEnumerable(\'length\') === true'); -} - - //CHECK#2 var count=0; for (var p in RegExp.prototype.exec){ - if (p==="length") count++; + if (p==="length") { + count++; + } } -if (count !== 0) { - throw new Test262Error('#2: count = 0; for (p in RegExp.prototype.exec){ if (p==="length") count++; } count === 0. Actual: ' + (count)); -} +assert.sameValue(count, 0, 'The value of count is expected to be 0'); + +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A9.js b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A9.js index 9e2ee38de8..ae0fb8808d 100644 --- a/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A9.js +++ b/test/built-ins/RegExp/prototype/exec/S15.10.6.2_A9.js @@ -10,18 +10,22 @@ description: > Checking if deleting the RegExp.prototype.exec.length property fails ---*/ +assert.sameValue( + RegExp.prototype.exec.hasOwnProperty('length'), + true, + 'RegExp.prototype.exec.hasOwnProperty(\'length\') must return true' +); -//CHECK#0 -if ((RegExp.prototype.exec.hasOwnProperty('length') !== true)) { - throw new Test262Error('#0: RegExp.prototype.exec.hasOwnProperty(\'length\') === true'); -} +assert.sameValue( + delete RegExp.prototype.exec.length, + true, + 'The value of `delete RegExp.prototype.exec.length` is expected to be true' +); -//CHECK#1 -if (delete RegExp.prototype.exec.length !== true) { - throw new Test262Error('#1: delete RegExp.prototype.exec.length === true'); -} +assert.sameValue( + RegExp.prototype.exec.hasOwnProperty('length'), + false, + 'RegExp.prototype.exec.hasOwnProperty(\'length\') must return false' +); -//CHECK#2 -if (RegExp.prototype.exec.hasOwnProperty('length') !== false) { - throw new Test262Error('#2: delete RegExp.prototype.exec.length; RegExp.prototype.exec.hasOwnProperty(\'length\') === false'); -} +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/global/S15.10.7.2_A10.js b/test/built-ins/RegExp/prototype/global/S15.10.7.2_A10.js index d5d3a5023b..3aefe9a79a 100644 --- a/test/built-ins/RegExp/prototype/global/S15.10.7.2_A10.js +++ b/test/built-ins/RegExp/prototype/global/S15.10.7.2_A10.js @@ -10,17 +10,11 @@ includes: [propertyHelper.js] var __re = RegExp.prototype; -//CHECK#1 -if (__re.hasOwnProperty('global') !== true) { - throw new Test262Error('#1: __re = RegExp.prototype; __re.hasOwnProperty(\'global\') === true'); -} +assert.sameValue(__re.hasOwnProperty('global'), true, '__re.hasOwnProperty(\'global\') must return true'); var __sample = /^|^/; var __obj = __sample.global; verifyNotWritable(__sample, "global", "global", "shifted"); -//CHECK#2 -if (__sample.global !== __obj) { - throw new Test262Error('#2: __sample = /^|^/; __obj = __sample.global; __sample.global = "shifted"; __sample.global === __obj. Actual: ' + (__sample.global)); -} +assert.sameValue(__sample.global, __obj, 'The value of __sample.global is expected to equal the value of __obj'); diff --git a/test/built-ins/RegExp/prototype/global/S15.10.7.2_A8.js b/test/built-ins/RegExp/prototype/global/S15.10.7.2_A8.js index 36048b7491..1417e67288 100644 --- a/test/built-ins/RegExp/prototype/global/S15.10.7.2_A8.js +++ b/test/built-ins/RegExp/prototype/global/S15.10.7.2_A8.js @@ -11,22 +11,21 @@ description: > var __re = RegExp.prototype; -//CHECK#0 -if (__re.hasOwnProperty('global') !== true) { - throw new Test262Error('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'global\') === true'); -} +assert.sameValue(__re.hasOwnProperty('global'), true, '__re.hasOwnProperty(\'global\') must return true'); - //CHECK#1 -if (__re.propertyIsEnumerable('global') !== false) { - throw new Test262Error('#1: __re = RegExp.prototype; __re.propertyIsEnumerable(\'global\') === false'); -} +assert.sameValue( + __re.propertyIsEnumerable('global'), + false, + '__re.propertyIsEnumerable(\'global\') must return false' +); - //CHECK#2 var count = 0 for (var p in __re){ - if (p==="global") count++ + if (p==="global") { + count++ + } } -if (count !== 0) { - throw new Test262Error('#2: count = 0; __re = RegExp.prototype; for (p in __re){ if (p==="global") count++; } count === 0. Actual: ' + (count)); -} +assert.sameValue(count, 0, 'The value of count is expected to be 0'); + +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/global/S15.10.7.2_A9.js b/test/built-ins/RegExp/prototype/global/S15.10.7.2_A9.js index cdb1e50691..a3351a56b2 100644 --- a/test/built-ins/RegExp/prototype/global/S15.10.7.2_A9.js +++ b/test/built-ins/RegExp/prototype/global/S15.10.7.2_A9.js @@ -11,17 +11,8 @@ description: Checking if deleting the global property succeeds var __re = RegExp.prototype; -//CHECK#0 -if (__re.hasOwnProperty('global') !== true) { - throw new Test262Error('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'global\') === true'); -} +assert.sameValue(__re.hasOwnProperty('global'), true, '__re.hasOwnProperty(\'global\') must return true'); +assert.sameValue(delete __re.global, true, 'The value of `delete __re.global` is expected to be true'); +assert.sameValue(__re.hasOwnProperty('global'), false, '__re.hasOwnProperty(\'global\') must return false'); -//CHECK#1 -if ((delete __re.global) !== true) { - throw new Test262Error('#1: __re = RegExp.prototype; (delete __re.global) === true'); -} - -//CHECK#2 -if (__re.hasOwnProperty('global') !== false) { - throw new Test262Error('#2: __re = RegExp.prototype;delete __re.global === true; __re.hasOwnProperty(\'global\') === false'); -} +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A10.js b/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A10.js index f0258b955d..28cc7da2b5 100644 --- a/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A10.js +++ b/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A10.js @@ -10,17 +10,15 @@ includes: [propertyHelper.js] var __re = RegExp.prototype; -//CHECK#1 -if (__re.hasOwnProperty('ignoreCase') !== true) { - throw new Test262Error('#1: __re = RegExp.prototype; __re.hasOwnProperty(\'ignoreCase\') === true'); -} +assert.sameValue(__re.hasOwnProperty('ignoreCase'), true, '__re.hasOwnProperty(\'ignoreCase\') must return true'); var __sample = /a|b|c/; var __obj = __sample.ignoreCase; verifyNotWritable(__sample, "ignoreCase", "ignoreCase", "shifted"); -//CHECK#2 -if (__sample.ignoreCase !== __obj) { - throw new Test262Error('#2: __sample = /a|b|c/; __obj = __sample.ignoreCase; __sample.ignoreCase = "shifted"; __sample.ignoreCase === __obj. Actual: ' + (__sample.ignoreCase)); -} +assert.sameValue( + __sample.ignoreCase, + __obj, + 'The value of __sample.ignoreCase is expected to equal the value of __obj' +); diff --git a/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A8.js b/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A8.js index 123ea90394..e717ad6b5f 100644 --- a/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A8.js +++ b/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A8.js @@ -11,22 +11,21 @@ description: > var __re = RegExp.prototype; -//CHECK#0 -if (__re.hasOwnProperty('ignoreCase') !== true) { - throw new Test262Error('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'ignoreCase\') === true'); -} +assert.sameValue(__re.hasOwnProperty('ignoreCase'), true, '__re.hasOwnProperty(\'ignoreCase\') must return true'); - //CHECK#1 -if (__re.propertyIsEnumerable('ignoreCase') !== false) { - throw new Test262Error('#1: __re = RegExp.prototype; __re.propertyIsEnumerable(\'ignoreCase\') === false'); -} +assert.sameValue( + __re.propertyIsEnumerable('ignoreCase'), + false, + '__re.propertyIsEnumerable(\'ignoreCase\') must return false' +); - //CHECK#2 var count = 0 for (var p in __re){ - if (p==="ignoreCase") count++ + if (p==="ignoreCase") { + count++ + } } -if (count !== 0) { - throw new Test262Error('#2: count = 0; __re = RegExp.prototype; for (p in __re){ if (p==="ignoreCase") count++; } count === 0. Actual: ' + (count)); -} +assert.sameValue(count, 0, 'The value of count is expected to be 0'); + +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A9.js b/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A9.js index 4819572204..801af035c6 100644 --- a/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A9.js +++ b/test/built-ins/RegExp/prototype/ignoreCase/S15.10.7.3_A9.js @@ -11,17 +11,8 @@ description: Checking if deleting the ignoreCase property succeeds var __re = RegExp.prototype; -//CHECK#0 -if (__re.hasOwnProperty('ignoreCase') !== true) { - throw new Test262Error('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'ignoreCase\') === true'); -} +assert.sameValue(__re.hasOwnProperty('ignoreCase'), true, '__re.hasOwnProperty(\'ignoreCase\') must return true'); +assert.sameValue(delete __re.ignoreCase, true, 'The value of `delete __re.ignoreCase` is expected to be true'); +assert.sameValue(__re.hasOwnProperty('ignoreCase'), false, '__re.hasOwnProperty(\'ignoreCase\') must return false'); -//CHECK#1 -if ((delete __re.ignoreCase) !== true) { - throw new Test262Error('#1: __re = RegExp.prototype; (delete __re.ignoreCase) === true'); -} - -//CHECK#2 -if (__re.hasOwnProperty('ignoreCase') !== false) { - throw new Test262Error('#2: __re = RegExp.prototype;delete __re.ignoreCase === true; __re.hasOwnProperty(\'ignoreCase\') === false'); -} +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A10.js b/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A10.js index 7c8d328bed..638debd3ca 100644 --- a/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A10.js +++ b/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A10.js @@ -10,17 +10,11 @@ includes: [propertyHelper.js] var __re = RegExp.prototype; -//CHECK#1 -if (__re.hasOwnProperty('multiline') !== true) { - throw new Test262Error('#1: __re = RegExp.prototype; __re.hasOwnProperty(\'multiline\') === true'); -} +assert.sameValue(__re.hasOwnProperty('multiline'), true, '__re.hasOwnProperty(\'multiline\') must return true'); var __sample = /\n/; var __obj = __sample.multiline; verifyNotWritable(__sample, "multiline", "multiline", "shifted"); -//CHECK#2 -if (__sample.multiline !== __obj) { - throw new Test262Error('#2: __sample = /\n/; __obj = __sample.multiline; __sample.multiline = "shifted"; __sample.multiline === __obj. Actual: ' + (__sample.multiline)); -} +assert.sameValue(__sample.multiline, __obj, 'The value of __sample.multiline is expected to equal the value of __obj'); diff --git a/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A8.js b/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A8.js index 06c706d20d..5a04b63c91 100644 --- a/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A8.js +++ b/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A8.js @@ -11,22 +11,21 @@ description: > var __re = RegExp.prototype; -//CHECK#0 -if (__re.hasOwnProperty('multiline') !== true) { - throw new Test262Error('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'multiline\') === true'); -} +assert.sameValue(__re.hasOwnProperty('multiline'), true, '__re.hasOwnProperty(\'multiline\') must return true'); - //CHECK#1 -if (__re.propertyIsEnumerable('multiline') !== false) { - throw new Test262Error('#1: __re = RegExp.prototype; __re.propertyIsEnumerable(\'multiline\') === false'); -} +assert.sameValue( + __re.propertyIsEnumerable('multiline'), + false, + '__re.propertyIsEnumerable(\'multiline\') must return false' +); - //CHECK#2 var count = 0 for (var p in __re){ - if (p==="multiline") count++ + if (p==="multiline") { + count++ + } } -if (count !== 0) { - throw new Test262Error('#2: count = 0; __re = RegExp.prototype; for (p in __re){ if (p==="multiline") count++; } count === 0. Actual: ' + (count)); -} +assert.sameValue(count, 0, 'The value of count is expected to be 0'); + +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A9.js b/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A9.js index f365ab6065..bf99e03cf7 100644 --- a/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A9.js +++ b/test/built-ins/RegExp/prototype/multiline/S15.10.7.4_A9.js @@ -11,17 +11,8 @@ description: Checking if deleting the multiline property succeeds var __re = RegExp.prototype; -//CHECK#0 -if (__re.hasOwnProperty('multiline') !== true) { - throw new Test262Error('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'multiline\') === true'); -} +assert.sameValue(__re.hasOwnProperty('multiline'), true, '__re.hasOwnProperty(\'multiline\') must return true'); +assert.sameValue(delete __re.multiline, true, 'The value of `delete __re.multiline` is expected to be true'); +assert.sameValue(__re.hasOwnProperty('multiline'), false, '__re.hasOwnProperty(\'multiline\') must return false'); -//CHECK#1 -if ((delete __re.multiline) !== true) { - throw new Test262Error('#1: __re = RegExp.prototype; (delete __re.multiline) === true'); -} - -//CHECK#2 -if (__re.hasOwnProperty('multiline') !== false) { - throw new Test262Error('#2: __re = RegExp.prototype;delete __re.multiline === true; __re.hasOwnProperty(\'multiline\') === false'); -} +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A10.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A10.js index 7aafbb0533..2fc3b1361d 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A10.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A10.js @@ -7,17 +7,20 @@ es5id: 15.10.6.3_A10 description: Checking if varying the RegExp.prototype.test.length property fails includes: [propertyHelper.js] ---*/ - -//CHECK#1 -if (RegExp.prototype.test.hasOwnProperty('length') !== true) { - throw new Test262Error('#1: RegExp.prototype.test.hasOwnProperty(\'length\') === true'); -} +assert.sameValue( + RegExp.prototype.test.hasOwnProperty('length'), + true, + 'RegExp.prototype.test.hasOwnProperty(\'length\') must return true' +); var __obj = RegExp.prototype.test.length; verifyNotWritable(RegExp.prototype.test, "length", null, function(){return "shifted";}); -//CHECK#2 -if (RegExp.prototype.test.length !== __obj) { - throw new Test262Error('#2: __obj = RegExp.prototype.test.length; RegExp.prototype.test.length = function(){return "shifted";}; RegExp.prototype.test.length === __obj. Actual: ' + (RegExp.prototype.test.length)); -} +assert.sameValue( + RegExp.prototype.test.length, + __obj, + 'The value of RegExp.prototype.test.length is expected to equal the value of __obj' +); + +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A11.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A11.js index 55bfad3382..18baa0b57b 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A11.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A11.js @@ -6,13 +6,10 @@ info: The length property of the test method is 1 es5id: 15.10.6.3_A11 description: Checking RegExp.prototype.test.length ---*/ +assert.sameValue( + RegExp.prototype.test.hasOwnProperty("length"), + true, + 'RegExp.prototype.test.hasOwnProperty("length") must return true' +); -//CHECK#1 -if (RegExp.prototype.test.hasOwnProperty("length") !== true) { - throw new Test262Error('#1: RegExp.prototype.test.hasOwnProperty(\'length\') === true'); -} - -//CHECK#2 -if (RegExp.prototype.test.length !== 1) { - throw new Test262Error('#2: RegExp.prototype.test.length === 1. Actual: ' + (RegExp.prototype.test.length)); -} +assert.sameValue(RegExp.prototype.test.length, 1, 'The value of RegExp.prototype.test.length is expected to be 1'); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T1.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T1.js index b46efa1f74..a3aaa0492f 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T1.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T1.js @@ -10,7 +10,8 @@ description: RegExp is /1|12/ and tested string is "123" var __string = "123"; var __re = /1|12/; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string = "123";__re = /1|12/; __re.test(__string) === (__re.exec(__string) !== null)'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test(""123"") must return __re.exec(__string) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T10.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T10.js index 380586ddd8..cb70db92a9 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T10.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T10.js @@ -10,7 +10,8 @@ description: RegExp is /1|12/ and tested string is 1.01 var __string = 1.01; var __re = /1|12/; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string = 1.01;__re = /1|12/; __re.test(__string) === (__re.exec(__string) !== null)'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test(1.01) must return __re.exec(__string) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T11.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T11.js index f463f014e2..65df8b808f 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T11.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T11.js @@ -10,7 +10,8 @@ description: RegExp is /2|12/ and tested string is new Number(1.012) var __string = new Number(1.012); var __re = /2|12/; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string = new Number(1.012); __re = /2|12/; __re.test(__string) === (__re.exec(__string) !== null)'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test(new Number(1.012)) must return __re.exec(__string) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T12.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T12.js index 6359c281f1..e5a0af48c6 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T12.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T12.js @@ -12,7 +12,8 @@ description: > var __string = {toString:function(){return Math.PI;}}; var __re = /\.14/; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string = {toString:function(){return Math.PI;}}; __re = /\\.14/; __re.test(__string) === (__re.exec(__string) !== null)'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test({toString:function(){return Math.PI;}}) must return __re.exec(__string) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T13.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T13.js index 889d2cb287..95aa08e5aa 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T13.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T13.js @@ -10,7 +10,8 @@ description: RegExp is /t[a-b|q-s]/ and tested string is true var __string = true; var __re = /t[a-b|q-s]/; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string = true;__re = /t[a-b|q-s]/; __re.test(__string) === (__re.exec(__string) !== null)'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test(true) must return __re.exec(__string) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T14.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T14.js index a86f1422d8..8daf156948 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T14.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T14.js @@ -10,7 +10,8 @@ description: RegExp is /AL|se/ and tested string is new Boolean var __string = new Boolean; var __re = /AL|se/; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string = new Boolean;__re = /AL|se/; __re.test(__string) === (__re.exec(__string) !== null)'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test(new Boolean) must return __re.exec(__string) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T15.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T15.js index 6c379dc7ec..481c66d70c 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T15.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T15.js @@ -12,7 +12,8 @@ description: > var __string = {toString:function(){return false;}}; var __re = /LS/i; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string = {toString:function(){return false;}}; __re = /LS/i; __re.test(__string) === (__re.exec(__string) !== null)'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test({toString:function(){return false;}}) must return __re.exec(__string) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T16.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T16.js index 9a2f11296b..8744f5a318 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T16.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T16.js @@ -9,7 +9,4 @@ description: RegExp is /undefined/ and call test() without arguments var __re = /undefined/; -//CHECK#0 -if (__re.test() !== (__re.exec() !== null)) { - throw new Test262Error('#0: __re = /undefined/; __re.test() === (__re.exec() !== null)'); -} +assert.sameValue(__re.test(), __re.exec() !== null, '__re.test() must return __re.exec() !== null'); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T17.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T17.js index 800bf6948d..623a42aaa0 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T17.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T17.js @@ -9,7 +9,4 @@ description: RegExp is /ll|l/ and tested string is null var __re = /ll|l/; -//CHECK#0 -if (__re.test(null) !== (__re.exec(null) !== null)) { - throw new Test262Error('#0: __re = /ll|l/; __re.test(null) === (__re.exec(null) !== null)'); -} +assert.sameValue(__re.test(null), __re.exec(null) !== null, '__re.test(null) must return __re.exec(null) !== null'); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T18.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T18.js index 9705eb78f1..9f1c962e69 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T18.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T18.js @@ -9,7 +9,8 @@ description: RegExp is /nd|ne/ and tested string is undefined var __re = /nd|ne/; -//CHECK#0 -if (__re.test(undefined) !== (__re.exec(undefined) !== null)) { - throw new Test262Error('#0: __re = /nd|ne/; __re.test(undefined) === (__re.exec(undefined) !== null)'); -} +assert.sameValue( + __re.test(undefined), + __re.exec(undefined) !== null, + '__re.test(undefined) must return __re.exec(undefined) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T19.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T19.js index 288b9c3f18..607587e5c5 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T19.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T19.js @@ -9,7 +9,8 @@ description: RegExp is /e{1}/ and tested string is void 0 var __re = /e{1}/; -//CHECK#0 -if (__re.test(void 0) !== (__re.exec(void 0) !== null)) { - throw new Test262Error('#0: __re = /e{1}/; __re.test(void 0) === (__re.exec(void 0) !== null)'); -} +assert.sameValue( + __re.test(void 0), + __re.exec(void 0) !== null, + '__re.test(void 0) must return __re.exec(void 0) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T2.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T2.js index 9c2e844b81..5f9ddf9e7e 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T2.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T2.js @@ -12,7 +12,8 @@ description: > var __string = new String("123"); var __re = /((1)|(12))((3)|(23))/; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string = new String("123"); __re = /((1)|(12))((3)|(23))/; __re.test(__string) === (__re.exec(__string) !== null)'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test("new String("123")") must return __re.exec(__string) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T20.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T20.js index 7fd090f900..bc3c60ef1b 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T20.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T20.js @@ -9,9 +9,6 @@ description: RegExp is /[a-f]d/ and tested string is x, where x is undefined var __re = /[a-f]d/; -//CHECK#0 -if (__re.test(x) !== (__re.exec(x) !== null)) { - throw new Test262Error('#0: __re = /[a-f]d/; __re.test(x) === (__re.exec(x) !== null); var x;'); -} +assert.sameValue(__re.test(x), __re.exec(x) !== null, '__re.test() must return __re.exec(x) !== null'); var x; diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T21.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T21.js index be87fedc89..2e4c1b5313 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T21.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T21.js @@ -11,7 +11,8 @@ description: > var __re = /[a-z]n/; -//CHECK#0 -if (__re.test(function(){}()) !== (__re.exec(function(){}()) !== null)) { - throw new Test262Error('#0: __re = /[a-z]n/; __re.test(function(){}()) === (__re.exec(function(){}()) !== null)'); -} +assert.sameValue( + __re.test(function(){}()), + __re.exec(function(){}()) !== null, + '__re.test(function(){}()) must return __re.exec(function(){}()) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T22.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T22.js index ffba29624b..a3d58adc31 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T22.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T22.js @@ -14,25 +14,11 @@ var __re = /(?:ab|cd)\d?/g; __re.lastIndex=-1; var __executed = __re.test("aacd22 "); -//CHECK#1 -if (!__executed) { - throw new Test262Error('#1: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=-1; __executed = __re.test("aacd22 "); __executed === true'); -} - -//CHECK#2 -if (__re.lastIndex !== 5) { - throw new Test262Error('#2: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=-1; __executed = __re.test("aacd22 "); __re.lastIndex === 5. Actual: ' + (__re.lastIndex)); -} +assert(!!__executed, 'The value of !!__executed is expected to be true'); +assert.sameValue(__re.lastIndex, 5, 'The value of __re.lastIndex is expected to be 5'); __re.lastIndex=-100; __executed = __re.test("aacd22 "); -//CHECK#3 -if (!__executed) { - throw new Test262Error('#3: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=-1; __executed = __re.test("aacd22 "); __re.lastIndex=-100; __executed = __re.test("aacd22 "); __executed === true'); -} - -//CHECK#4 -if (__re.lastIndex !== 5) { - throw new Test262Error('#4: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=-1; __executed = __re.test("aacd22 "); __re.lastIndex=-100; __executed = __re.test("aacd22 "); __re.lastIndex === 5. Actual: ' + (__re.lastIndex)); -} +assert(!!__executed, 'The value of !!__executed is expected to be true'); +assert.sameValue(__re.lastIndex, 5, 'The value of __re.lastIndex is expected to be 5'); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T3.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T3.js index a2c57dc774..88f4ecf916 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T3.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T3.js @@ -12,7 +12,8 @@ description: > var __string = new Object("abcdefghi"); var __re = /a[a-z]{2,4}/; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string = new Object("abcdefghi"); __re = /a[a-z]{2,4}/; __re.test(__string) === (__re.exec(__string) !== null)'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test("new Object("abcdefghi")") must return __re.exec(__string) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T4.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T4.js index 15f835ae67..42c4e483bb 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T4.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T4.js @@ -12,7 +12,8 @@ description: > var __string = {toString:function(){return "abcdefghi";}}; var __re = /a[a-z]{2,4}?/; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string = {toString:function(){return "abcdefghi";}}; __re = /a[a-z]{2,4}?/; __re.test(__string) === (__re.exec(__string) !== null)'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test({toString:function(){return "abcdefghi";}}) must return __re.exec(__string) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T5.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T5.js index b0102ab6c1..9c436123e2 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T5.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T5.js @@ -13,7 +13,8 @@ description: > var __string = {toString:function(){return {};}, valueOf:function(){return "aabaac";}}; var __re = /(aa|aabaac|ba|b|c)*/; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string = {toString:function(){return {};}, valueOf:function(){return "aabaac";}}; __re = /(aa|aabaac|ba|b|c)*/; __re.test(__string) === (__re.exec(__string) !== null)'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test("{toString:function(){return {};}, valueOf:function(){return "aabaac";}}) must return __re.exec(__string) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T6.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T6.js index 38d0a83335..ba4e975b10 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T6.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T6.js @@ -11,7 +11,8 @@ description: > var __re = /(z)((a+)?(b+)?(c))*/; -//CHECK#0 -if (__re.test((function(){return "zaacbbbcac"})()) !== (__re.exec((function(){return "zaacbbbcac"})()) !== null)) { - throw new Test262Error('#0: __re = /(z)((a+)?(b+)?(c))*/; __re.test((function(){return "zaacbbbcac"})()) === (__re.exec((function(){return "zaacbbbcac"})()) !== null)'); -} +assert.sameValue( + __re.test((function(){return "zaacbbbcac"})()), + __re.exec((function(){return "zaacbbbcac"})()) !== null, + '__re.test((function(){return "zaacbbbcac"})()) must return __re.exec((function(){return "zaacbbbcac"})()) !== null' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T7.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T7.js index 9e196aa868..b84ae3cf62 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T7.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T7.js @@ -9,11 +9,10 @@ description: > "intostr";}} ---*/ -//CHECK#1 try { - throw new Test262Error('#1.1: /[a-z]/.test({toString:function(){throw "intostr";}}) throw "intostr". Actual: ' + (/[a-z]/.test({toString:function(){throw "intostr";}}))); + throw new Test262Error('#1.1: /[a-z]/.test({toString:function(){throw "intostr";}}) throw "intostr". Actual: ' + (/[a-z]/.test({toString:function(){throw "intostr";}}))); } catch (e) { - if (e !== "intostr") { - throw new Test262Error('#1.2: /[a-z]/.test({toString:function(){throw "intostr";}}) throw "intostr". Actual: ' + (e)); - } + assert.sameValue(e, "intostr", 'The value of e is expected to be "intostr"'); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T8.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T8.js index fcabf1f116..4cc1052324 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T8.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T8.js @@ -9,11 +9,10 @@ description: > valueOf:function(){throw "invalof";}} ---*/ -//CHECK#1 try { throw new Test262Error('#1.1: /[a-z]/.test({toString:void 0, valueOf:function(){throw "invalof";}}) throw "invalof". Actual: ' + (/[a-z]/.test({toString:void 0, valueOf:function(){throw "invalof";}}))); } catch (e) { - if (e !== "invalof") { - throw new Test262Error('#1.2: /[a-z]/.test({toString:void 0, valueOf:function(){throw "invalof";}}) throw "invalof". Actual: ' + (e)); - } + assert.sameValue(e, "invalof", 'The value of e is expected to be "invalof"'); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T9.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T9.js index 803e21683d..a93072ab7e 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T9.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A1_T9.js @@ -10,9 +10,10 @@ description: RegExp is /1|12/ and tested string is function object var __string; var __re = /1|12/; -//CHECK#0 -if (__re.test(__string) !== (__re.exec(__string) !== null)) { - throw new Test262Error('#0: var __string;__re = /1|12/; __re.test(__string) === (__re.exec(__string) !== null); function __string(){};'); -} +assert.sameValue( + __re.test(__string), + __re.exec(__string) !== null, + '__re.test() must return __re.exec(__string) !== null' +); -function __string(){}; +function __string(){} diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T1.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T1.js index 83535ed48a..5a35a72da7 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T1.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T1.js @@ -13,11 +13,14 @@ var __instance = new Object; __instance.test = RegExp.prototype.test; -//CHECK#1 try { throw new Test262Error('#1.1: __instance = new Object; __instance.test = RegExp.prototype.test; __instance.test("message to investigate"). Actual: ' + (__instance.test("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = new Object; __instance.test = RegExp.prototype.test. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T10.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T10.js index ab006c2227..e22c51e2d6 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T10.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T10.js @@ -11,11 +11,14 @@ description: The tested object is undefined var test = RegExp.prototype.test; -//CHECK#1 try { throw new Test262Error('#1.1: test = RegExp.prototype.test; test("message to investigate"). Actual: ' + (test("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: test = RegExp.prototype.test; test("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T2.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T2.js index bc13312a39..5ae444e795 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T2.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T2.js @@ -13,12 +13,15 @@ var __instance = Math; __instance.test = RegExp.prototype.test; -//CHECK#1 try { __instance.test("message to investigate"); throw new Test262Error('#1.1: __instance = Math; __instance.test = RegExp.prototype.test; __instance.test("message to investigate")'); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = Math; __instance.test = RegExp.prototype.test; __instance.test("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T3.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T3.js index 4e5b95e762..e69ae65018 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T3.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T3.js @@ -11,14 +11,17 @@ description: The tested object is function object __instance.test = RegExp.prototype.test; -//CHECK#1 try { __instance.test("message to investigate"); throw new Test262Error('#1.1: __instance.test = RegExp.prototype.test; __instance.test("message to investigate"); function __instance(){}'); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance.test = RegExp.prototype.test; __instance.test("message to investigate"); function __instance(){}. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } function __instance(){}; + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T4.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T4.js index cdbd269a28..83dca06b27 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T4.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T4.js @@ -13,11 +13,14 @@ var __instance = new String("[a-b]"); __instance.test = RegExp.prototype.test; -//CHECK#1 try { throw new Test262Error('#1.1: __instance = new String("[a-b]"); __instance.test = RegExp.prototype.test; test("message to investigate"). Actual: ' + (__instance.test("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = new String("[a-b]"); __instance.test = RegExp.prototype.test; test("message to investigate"). Actual: ' + (e)); - } - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); + } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T5.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T5.js index fdfd7dcd0c..926a26403f 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T5.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T5.js @@ -13,11 +13,14 @@ var __instance = new Boolean(false); __instance.test = RegExp.prototype.test; -//CHECK#1 try { throw new Test262Error('#1.1: __instance = new Boolean(false); __instance.test = RegExp.prototype.test; test("message to investigate"). Actual: ' + (__instance.test("message to investigate"))); } catch (e) { - if ((e instanceof TypeError !== true)) { - throw new Test262Error('#1.2: __instance = new Boolean(false); __instance.test = RegExp.prototype.test; test("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T6.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T6.js index e0fd5a63fd..ecea1aaa75 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T6.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T6.js @@ -13,11 +13,14 @@ var __instance = new Number(1.0); __instance.test = RegExp.prototype.test; -//CHECK#1 try { throw new Test262Error('#1.1: __instance = new Number(1.0); __instance.test = RegExp.prototype.test; __instance["test"]("message to investigate"). Actual: ' + (__instance["test"]("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = new Number(1.0); __instance.test = RegExp.prototype.test; __instance["test"]("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T7.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T7.js index 7f71bfb5fd..4c5e7d54a6 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T7.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T7.js @@ -13,11 +13,14 @@ var __instance = false; Object.prototype.test = RegExp.prototype.test; -//CHECK#1 try { throw new Test262Error('#1.1: __instance = false; Object.prototype.test = RegExp.prototype.test; __instance.test("message to investigate"). Actual: ' + (__instance.test("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = false; Object.prototype.test = RegExp.prototype.test; __instance.test("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T8.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T8.js index 5a91187b8b..b7ee79749a 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T8.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T8.js @@ -13,11 +13,14 @@ var __instance = "."; Object.prototype.test = RegExp.prototype.test; -//CHECK#1 try { throw new Test262Error('#1.1: __instance = "."; Object.prototype.test = RegExp.prototype.test; __instance.test("message to investigate"). Actual: ' + (__instance.test("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = "."; Object.prototype.test = RegExp.prototype.test; __instance.test("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T9.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T9.js index de89bd998c..63cf992e9b 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T9.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A2_T9.js @@ -13,11 +13,14 @@ var __instance = 1.0; Object.prototype.test = RegExp.prototype.test; -//CHECK#1 try { throw new Test262Error('#1.1: __instance = 1.0; Object.prototype.test = RegExp.prototype.test; __instance.test("message to investigate"). Actual: ' + (__instance.test("message to investigate"))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __instance = 1.0; Object.prototype.test = RegExp.prototype.test; __instance.test("message to investigate"). Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A6.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A6.js index 4de61bc0ca..cf8177110b 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A6.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A6.js @@ -6,8 +6,8 @@ info: RegExp.prototype.test has not prototype property es5id: 15.10.6.3_A6 description: Checking RegExp.prototype.test.prototype ---*/ - -//CHECK#1 -if (RegExp.prototype.test.prototype !== undefined) { - throw new Test262Error('#1: RegExp.prototype.test.prototype === undefined. Actual: ' + (RegExp.prototype.test.prototype)); -} +assert.sameValue( + RegExp.prototype.test.prototype, + undefined, + 'The value of RegExp.prototype.test.prototype is expected to equal undefined' +); diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A7.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A7.js index 5e679ce834..39f738934e 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A7.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A7.js @@ -13,7 +13,11 @@ try { var __instance = new __FACTORY; throw new Test262Error('#1.1: __FACTORY = RegExp.prototype.test throw TypeError. Actual: ' + (__instance)); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __FACTORY = RegExp.prototype.test throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A8.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A8.js index b15989fef2..f9474731a0 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A8.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A8.js @@ -8,24 +8,26 @@ description: > Checking if enumerating the RegExp.prototype.test.length property fails ---*/ +assert.sameValue( + RegExp.prototype.test.hasOwnProperty('length'), + true, + 'RegExp.prototype.test.hasOwnProperty(\'length\') must return true' +); -//CHECK#0 -if (RegExp.prototype.test.hasOwnProperty('length') !== true) { - throw new Test262Error('#0: RegExp.prototype.test.hasOwnProperty(\'length\') === true'); -} +assert.sameValue( + RegExp.prototype.test.propertyIsEnumerable('length'), + false, + 'RegExp.prototype.test.propertyIsEnumerable(\'length\') must return false' +); - //CHECK#1 -if (RegExp.prototype.test.propertyIsEnumerable('length') !== false) { - throw new Test262Error('#1: RegExp.prototype.test.propertyIsEnumerable(\'length\') === true'); -} - - //CHECK#2 var count=0; for (var p in RegExp.prototype.test){ - if (p==="length") count++; + if (p==="length") { + count++; + } } -if (count !== 0) { - throw new Test262Error('#2: count = 0; for (p in RegExp.prototype.test){ if (p==="length") count++; } count === 0. Actual: ' + (count)); -} +assert.sameValue(count, 0, 'The value of count is expected to be 0'); + +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A9.js b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A9.js index a9ea9b68fb..99675418d7 100644 --- a/test/built-ins/RegExp/prototype/test/S15.10.6.3_A9.js +++ b/test/built-ins/RegExp/prototype/test/S15.10.6.3_A9.js @@ -8,18 +8,22 @@ info: | es5id: 15.10.6.3_A9 description: Checking if deleting RegExp.prototype.test.length property fails ---*/ +assert.sameValue( + RegExp.prototype.exec.hasOwnProperty('length'), + true, + 'RegExp.prototype.exec.hasOwnProperty(\'length\') must return true' +); -//CHECK#0 -if ((RegExp.prototype.exec.hasOwnProperty('length') !== true)) { - throw new Test262Error('#0: RegExp.prototype.exec.hasOwnProperty(\'length\') === true'); -} +assert.sameValue( + delete RegExp.prototype.exec.length, + true, + 'The value of `delete RegExp.prototype.exec.length` is expected to be true' +); -//CHECK#1 -if (delete RegExp.prototype.exec.length !== true) { - throw new Test262Error('#1: delete RegExp.prototype.exec.length === true'); -} +assert.sameValue( + RegExp.prototype.exec.hasOwnProperty('length'), + false, + 'RegExp.prototype.exec.hasOwnProperty(\'length\') must return false' +); -//CHECK#2 -if (RegExp.prototype.exec.hasOwnProperty('length') !== false) { - throw new Test262Error('#2: delete RegExp.prototype.exec.length; RegExp.prototype.exec.hasOwnProperty(\'length\') === false'); -} +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A10.js b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A10.js index 72991ba61c..c34784e36e 100644 --- a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A10.js +++ b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A10.js @@ -9,17 +9,20 @@ description: > fails includes: [propertyHelper.js] ---*/ - -//CHECK#1 -if (RegExp.prototype.toString.hasOwnProperty('length') !== true) { - throw new Test262Error('#1: RegExp.prototype.toString.hasOwnProperty(\'length\') === true'); -} +assert.sameValue( + RegExp.prototype.toString.hasOwnProperty('length'), + true, + 'RegExp.prototype.toString.hasOwnProperty(\'length\') must return true' +); var __obj = RegExp.prototype.toString.length; verifyNotWritable(RegExp.prototype.toString, "length", null, function(){return "shifted";}); -//CHECK#2 -if (RegExp.prototype.toString.length !== __obj) { - throw new Test262Error('#2: __obj = RegExp.prototype.toString.length; RegExp.prototype.toString.length = function(){return "shifted";}; RegExp.prototype.toString.length === __obj. Actual: ' + (RegExp.prototype.toString.length)); -} +assert.sameValue( + RegExp.prototype.toString.length, + __obj, + 'The value of RegExp.prototype.toString.length is expected to equal the value of __obj' +); + +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A11.js b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A11.js index 4c3c8bfe39..badf0c6ce7 100644 --- a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A11.js +++ b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A11.js @@ -6,13 +6,14 @@ info: The length property of the toString method is 1 es5id: 15.10.6.4_A11 description: Checking RegExp.prototype.toString.length ---*/ +assert.sameValue( + RegExp.prototype.toString.hasOwnProperty("length"), + true, + 'RegExp.prototype.toString.hasOwnProperty("length") must return true' +); -//CHECK#1 -if (RegExp.prototype.toString.hasOwnProperty("length") !== true) { - throw new Test262Error('#1: RegExp.prototype.toString.hasOwnProperty(\'length\') === true'); -} - -//CHECK#2 -if (RegExp.prototype.toString.length !== 0) { - throw new Test262Error('#2: RegExp.prototype.toString.length === 0. Actual: ' + (RegExp.prototype.toString.length)); -} +assert.sameValue( + RegExp.prototype.toString.length, + 0, + 'The value of RegExp.prototype.toString.length is expected to be 0' +); diff --git a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A6.js b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A6.js index e5b31934e0..4cdfe4ca82 100644 --- a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A6.js +++ b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A6.js @@ -6,8 +6,8 @@ info: RegExp.prototype.toString has not prototype property es5id: 15.10.6.4_A6 description: Checking RegExp.prototype.toString.prototype ---*/ - -//CHECK#1 -if (RegExp.prototype.toString.prototype !== undefined) { - throw new Test262Error('#1: RegExp.prototype.toString.prototype === undefined. Actual: ' + (RegExp.prototype.toString.prototype)); -} +assert.sameValue( + RegExp.prototype.toString.prototype, + undefined, + 'The value of RegExp.prototype.toString.prototype is expected to equal undefined' +); diff --git a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A7.js b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A7.js index efeca299bf..faeddca853 100644 --- a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A7.js +++ b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A7.js @@ -10,10 +10,14 @@ description: Checking if creating the RegExp.prototype.toString object fails var __FACTORY = RegExp.prototype.toString; try { - var __instance = new __FACTORY; - throw new Test262Error('#1.1: __FACTORY = RegExp.prototype.toString throw TypeError. Actual: ' + (__instance)); + var __instance = new __FACTORY; + throw new Test262Error('#1.1: __FACTORY = RegExp.prototype.toString throw TypeError. Actual: ' + (__instance)); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: __FACTORY = RegExp.prototype.toString throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } + +// TODO: Convert to assert.throws() format. diff --git a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A8.js b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A8.js index c2532be57c..049cecd795 100644 --- a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A8.js +++ b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A8.js @@ -8,24 +8,26 @@ description: > Checking if enumerating the RegExp.prototype.toString.length property fails ---*/ +assert.sameValue( + RegExp.prototype.toString.hasOwnProperty('length'), + true, + 'RegExp.prototype.toString.hasOwnProperty(\'length\') must return true' +); -//CHECK#0 -if (RegExp.prototype.toString.hasOwnProperty('length') !== true) { - throw new Test262Error('#0: RegExp.prototype.toString.hasOwnProperty(\'length\') === true'); -} +assert.sameValue( + RegExp.prototype.toString.propertyIsEnumerable('length'), + false, + 'RegExp.prototype.toString.propertyIsEnumerable(\'length\') must return false' +); - //CHECK#1 -if (RegExp.prototype.toString.propertyIsEnumerable('length') !== false) { - throw new Test262Error('#1: RegExp.prototype.toString.propertyIsEnumerable(\'length\') === true'); -} - - //CHECK#2 var count=0; for (var p in RegExp.prototype.toString){ - if (p==="length") count++; + if (p==="length") { + count++; + } } -if (count !== 0) { - throw new Test262Error('#2: count = 0; for (p in RegExp.prototype.toString){ if (p==="length") count++; } count === 0. Actual: ' + (count)); -} +assert.sameValue(count, 0, 'The value of count is expected to be 0'); + +// TODO: Convert to verifyProperty() format. diff --git a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A9.js b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A9.js index aaec39054e..54cd07d39d 100644 --- a/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A9.js +++ b/test/built-ins/RegExp/prototype/toString/S15.10.6.4_A9.js @@ -10,18 +10,22 @@ description: > Checking if deleting the RegExp.prototype.toString.length property fails ---*/ +assert.sameValue( + RegExp.prototype.toString.hasOwnProperty('length'), + true, + 'RegExp.prototype.toString.hasOwnProperty(\'length\') must return true' +); -//CHECK#0 -if ((RegExp.prototype.toString.hasOwnProperty('length') !== true)) { - throw new Test262Error('#0: RegExp.prototype.toString.hasOwnProperty(\'length\') === true'); -} +assert.sameValue( + delete RegExp.prototype.toString.length, + true, + 'The value of `delete RegExp.prototype.toString.length` is expected to be true' +); -//CHECK#1 -if (delete RegExp.prototype.toString.length !== true) { - throw new Test262Error('#1: delete RegExp.prototype.toString.length === true'); -} +assert.sameValue( + RegExp.prototype.toString.hasOwnProperty('length'), + false, + 'RegExp.prototype.toString.hasOwnProperty(\'length\') must return false' +); -//CHECK#2 -if (RegExp.prototype.toString.hasOwnProperty('length') !== false) { - throw new Test262Error('#2: delete RegExp.prototype.toString.length; RegExp.prototype.toString.hasOwnProperty(\'length\') === false'); -} +// TODO: Convert to verifyProperty() format.