Skip to content

Commit 1765269

Browse files
change itertools namespace for array in tests
1 parent d19055d commit 1765269

25 files changed

+53
-53
lines changed

test/js/src/map/chain.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var one = function ( iterables, out ) {
55

66
msg = "chain " + JSON.stringify( iterables );
77

8-
deepEqual( itertools.chain( iterables, [] ), out, msg );
8+
deepEqual( array.chain( iterables, [] ), out, msg );
99

1010
};
1111

test/js/src/map/combinations.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ one = function ( iterable, repeat, expected ) {
55

66

77
deepEqual(
8-
itertools.combinations( iterable, repeat, [] ),
8+
array.combinations( iterable, repeat, [] ),
99
expected,
1010
JSON.stringify( [iterable, repeat] )
1111
);
@@ -17,12 +17,12 @@ one = function ( iterable, repeat, expected ) {
1717
test( "combinations", function () {
1818

1919
one( "ABCD", 2, [ ["A","B"], ["A","C"], ["A","D"], ["B","C"], ["B","D"], ["C","D"]] );
20-
one( itertools.range( 0, 4, 1, [] ), 3, [ [0,1,2], [0,1,3], [0,2,3], [1,2,3] ] );
21-
one( itertools.range( 0, 4, 1, [] ), 4, [ [0,1,2,3] ] );
22-
one( itertools.range( 0, 4, 1, [] ), 5, [] );
23-
one( itertools.range( 0, 4, 1, [] ), 0, [[]] );
24-
one( itertools.range( 0, 0, 1, [] ), 0, [[]] );
25-
one( itertools.range( 0, 0, 1, [] ), 1, [] );
20+
one( array.range( 0, 4, 1, [] ), 3, [ [0,1,2], [0,1,3], [0,2,3], [1,2,3] ] );
21+
one( array.range( 0, 4, 1, [] ), 4, [ [0,1,2,3] ] );
22+
one( array.range( 0, 4, 1, [] ), 5, [] );
23+
one( array.range( 0, 4, 1, [] ), 0, [[]] );
24+
one( array.range( 0, 0, 1, [] ), 0, [[]] );
25+
one( array.range( 0, 0, 1, [] ), 1, [] );
2626

2727
});
2828

test/js/src/map/combinationswithrepetition.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ one = function ( iterable, repeat, expected ) {
55

66

77
deepEqual(
8-
itertools.combinationswithrepetition( iterable, repeat, [] ),
8+
array.combinationswithrepetition( iterable, repeat, [] ),
99
expected,
1010
JSON.stringify( [iterable, repeat] )
1111
);
@@ -17,10 +17,10 @@ one = function ( iterable, repeat, expected ) {
1717
test( "combinationswithrepetition", function () {
1818

1919
one( "ABC", 2, [ ["A","A"], ["A","B"], ["A","C"], ["B","B"], ["B","C"], ["C","C"] ] );
20-
one( itertools.range( 0, 3, 1, [] ), 2, [ [0,0], [0,1], [0,2], [1,1], [1,2], [2,2] ] );
21-
one( itertools.range( 0, 0, 1, [] ), 2, [] );
22-
one( itertools.range( 0, 4, 1, [] ), 0, [ [] ] );
23-
one( itertools.range( 0, 0, 1, [] ), 0, [ [] ] );
20+
one( array.range( 0, 3, 1, [] ), 2, [ [0,0], [0,1], [0,2], [1,1], [1,2], [2,2] ] );
21+
one( array.range( 0, 0, 1, [] ), 2, [] );
22+
one( array.range( 0, 4, 1, [] ), 0, [ [] ] );
23+
one( array.range( 0, 0, 1, [] ), 0, [ [] ] );
2424

2525
});
2626

test/js/src/map/compress.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ one = function ( iterable, selector, expected ) {
55

66

77
deepEqual(
8-
itertools.compress( iterable, selector, [] ),
8+
array.compress( iterable, selector, [] ),
99
expected,
1010
JSON.stringify( [iterable, selector] )
1111
);

test/js/src/map/dropwhile.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ one = function ( iterable, predicate, expected ) {
88

99

1010
deepEqual(
11-
itertools.dropwhile( predicate, iterable, [] ),
11+
array.dropwhile( predicate, iterable, [] ),
1212
expected,
1313
JSON.stringify( [iterable, predicate] )
1414
);
@@ -20,21 +20,21 @@ one = function ( iterable, predicate, expected ) {
2020
test( "dropwhile", function () {
2121

2222
one(
23-
itertools.range( 0, 100, 1, [] ),
23+
array.range( 0, 100, 1, [] ),
2424
functools.rpartial( operator.lt, null, [50] ),
25-
itertools.range( 50, 100, 1, [] )
25+
array.range( 50, 100, 1, [] )
2626
);
2727

2828
one(
29-
itertools.range( 0, 100, 1, [] ),
29+
array.range( 0, 100, 1, [] ),
3030
functools.rpartial( operator.lt, null, [100] ),
31-
itertools.range( 0, 0, 1, [] )
31+
array.range( 0, 0, 1, [] )
3232
);
3333

3434
one(
35-
itertools.range( 0, 0, 1, [] ),
35+
array.range( 0, 0, 1, [] ),
3636
functools.rpartial( operator.lt, null, [1] ),
37-
itertools.range( 0, 0, 1, [] )
37+
array.range( 0, 0, 1, [] )
3838
);
3939

4040
});

test/js/src/map/enumerate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var one = function ( iterable, out ) {
44

55
msg = "enumerate " + JSON.stringify( iterable );
66

7-
deepEqual( itertools.enumerate( iterable, [] ), out, msg )
7+
deepEqual( array.enumerate( iterable, [] ), out, msg )
88

99
};
1010

test/js/src/map/filter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var one = function ( predicate, iterable, out ) {
55

66
msg = "filter " + JSON.stringify( iterable );
77

8-
deepEqual( itertools.filter( predicate, iterable, [] ), out, msg );
8+
deepEqual( array.filter( predicate, iterable, [] ), out, msg );
99
};
1010

1111

test/js/src/map/filterfalse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var one = function ( predicate, iterable, out ) {
55

66
msg = "filterfalse " + JSON.stringify( iterable );
77

8-
deepEqual( itertools.filterfalse( predicate, iterable, [] ), out, msg );
8+
deepEqual( array.filterfalse( predicate, iterable, [] ), out, msg );
99
};
1010

1111

test/js/src/map/group.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ one = function ( key, iterable, expected ) {
77

88

99
deepEqual(
10-
itertools.group( key, iterable, [] ),
10+
array.group( key, iterable, [] ),
1111
expected,
1212
JSON.stringify( [iterable, key] )
1313
);

test/js/src/map/map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var one = function ( callable, iterable, out ) {
44

55
msg = "map " + JSON.stringify( iterable );
66

7-
deepEqual( itertools.map( callable, iterable, [] ), out, msg )
7+
deepEqual( array.map( callable, iterable, [] ), out, msg )
88

99
};
1010

0 commit comments

Comments
 (0)