Browse files

tests were getting messed up by array add on functions

  • Loading branch information...
1 parent 68d9517 commit 09670c72f6ebadd972bba779fb4a33ca52d18ae9 @astaple astaple committed Aug 18, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1 jstests/or1.js
  2. +1 −1 jstests/or2.js
  3. +1 −1 jstests/or3.js
  4. +1 −1 jstests/or4.js
View
2 jstests/or1.js
@@ -7,7 +7,7 @@ checkArrs = function( a, b, m ) {
bStr = [];
a.forEach( function( x ) { aStr.push( tojson( x ) ); } );
b.forEach( function( x ) { bStr.push( tojson( x ) ); } );
- for ( i in aStr ) {
+ for ( i = 0; i < aStr.length; ++i ) {
assert( -1 != bStr.indexOf( aStr[ i ] ), m );
}
}
View
2 jstests/or2.js
@@ -7,7 +7,7 @@ checkArrs = function( a, b, m ) {
bStr = [];
a.forEach( function( x ) { aStr.push( tojson( x ) ); } );
b.forEach( function( x ) { bStr.push( tojson( x ) ); } );
- for ( i in aStr ) {
+ for ( i = 0; i < aStr.length; ++i ) {
assert( -1 != bStr.indexOf( aStr[ i ] ), m );
}
}
View
2 jstests/or3.js
@@ -7,7 +7,7 @@ checkArrs = function( a, b, m ) {
bStr = [];
a.forEach( function( x ) { aStr.push( tojson( x ) ); } );
b.forEach( function( x ) { bStr.push( tojson( x ) ); } );
- for ( i in aStr ) {
+ for ( i = 0; i < aStr.length; ++i ) {
assert( -1 != bStr.indexOf( aStr[ i ] ), m );
}
}
View
2 jstests/or4.js
@@ -17,7 +17,7 @@ checkArrs = function( a, b ) {
bStr = [];
a.forEach( function( x ) { aStr.push( tojson( x ) ); } );
b.forEach( function( x ) { bStr.push( tojson( x ) ); } );
- for ( i in aStr ) {
+ for ( i = 0; i < aStr.length; ++i ) {
assert( -1 != bStr.indexOf( aStr[ i ] ), m );
}
}

0 comments on commit 09670c7

Please sign in to comment.