@@ -10,26 +10,30 @@ import {
1010} from 'angular2/src/facade/lang' ;
1111
1212export function main ( ) {
13- describe ( 'RegExp' , ( ) => { it ( 'should expose the index for each match' , ( ) => {
14- var re = RegExpWrapper . create ( '(!)' ) ;
15- var matcher = RegExpWrapper . matcher ( re , '0!23!567!!' ) ;
16- var indexes = [ ] ;
17- var m ;
18-
19- while ( isPresent ( m = RegExpMatcherWrapper . next ( matcher ) ) ) {
20- ListWrapper . push ( indexes , m . index ) ;
21- expect ( m [ 0 ] ) . toEqual ( '!' ) ;
22- expect ( m [ 1 ] ) . toEqual ( '!' ) ;
23- expect ( m . length ) . toBe ( 2 ) ;
24- }
25-
26- expect ( indexes ) . toEqual ( [ 1 , 4 , 8 , 9 ] ) ;
27- } ) } ) ;
28-
29- describe ( 'const' , ( ) => { it ( 'should support const expressions both in TS and Dart' , ( ) => {
30- const numbers = CONST_EXPR ( [ 1 , 2 , 3 ] ) ;
31- expect ( numbers ) . toEqual ( [ 1 , 2 , 3 ] ) ;
32- } ) } ) ;
13+ describe ( 'RegExp' , ( ) => {
14+ it ( 'should expose the index for each match' , ( ) => {
15+ var re = RegExpWrapper . create ( '(!)' ) ;
16+ var matcher = RegExpWrapper . matcher ( re , '0!23!567!!' ) ;
17+ var indexes = [ ] ;
18+ var m ;
19+
20+ while ( isPresent ( m = RegExpMatcherWrapper . next ( matcher ) ) ) {
21+ ListWrapper . push ( indexes , m . index ) ;
22+ expect ( m [ 0 ] ) . toEqual ( '!' ) ;
23+ expect ( m [ 1 ] ) . toEqual ( '!' ) ;
24+ expect ( m . length ) . toBe ( 2 ) ;
25+ }
26+
27+ expect ( indexes ) . toEqual ( [ 1 , 4 , 8 , 9 ] ) ;
28+ } ) ;
29+ } ) ;
30+
31+ describe ( 'const' , ( ) => {
32+ it ( 'should support const expressions both in TS and Dart' , ( ) => {
33+ const numbers = CONST_EXPR ( [ 1 , 2 , 3 ] ) ;
34+ expect ( numbers ) . toEqual ( [ 1 , 2 , 3 ] ) ;
35+ } ) ;
36+ } ) ;
3337
3438 describe ( 'String' , ( ) => {
3539 var upper , lower ;
0 commit comments