| 1 |
// Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: | |
| 6 |
Since assertion evaluating do not change endIndex repetition of assertion |
| 7 |
does the same result |
| 8 |
es5id: 15.10.2.6_A5_T2 |
| 9 |
description: > |
| 10 |
Execute /\B\B\B\B\B\Bbot\b\b\b\b\b\b\b/.exec("robot wall-e") and |
| 11 |
check results |
| 12 |
---*/ |
| 13 |
|
| 14 |
var __executed = /\B\B\B\B\B\Bbot\b\b\b\b\b\b\b/.exec("robot wall-e"); |
| 15 |
|
| 16 |
var __expected = ["bot"]; |
| 17 |
__expected.index = 2; |
| 18 |
__expected.input = "robot wall-e"; |
| 19 |
|
| 20 |
//CHECK#1 |
| 21 |
if (__executed.length !== __expected.length) { |
| 22 |
$ERROR('#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); |
| 23 |
} |
| 24 |
|
| 25 |
//CHECK#2 |
| 26 |
if (__executed.index !== __expected.index) { |
| 27 |
$ERROR('#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); |
| 28 |
} |
| 29 |
|
| 30 |
//CHECK#3 |
| 31 |
if (__executed.input !== __expected.input) { |
| 32 |
$ERROR('#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); |
| 33 |
} |
| 34 |
|
| 35 |
//CHECK#4 |
| 36 |
for(var index=0; index<__expected.length; index++) { |
| 37 |
if (__executed[index] !== __expected[index]) { |
| 38 |
$ERROR('#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]); |
| 39 |
} |
| 40 |
} |