UtilsTestCase.prototype.testIterator_nopredicate = function() {
var array = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
var iter = Dygraph.createIterator(array, 1, 4);
UtilsTestCase.prototype.testIterator_nopredicate = function() {
var array = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
var iter = Dygraph.createIterator(array, 1, 4);
- assertTrue(iter.hasNext());
- assertEquals('b', iter.peek());
+ assertTrue(iter.hasNext);
+ assertEquals('b', iter.peek);
}
UtilsTestCase.prototype.testIterator_predicate = function() {
var array = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
var iter = Dygraph.createIterator(array, 1, 4,
function(array, idx) { return array[idx] !== 'd' });
}
UtilsTestCase.prototype.testIterator_predicate = function() {
var array = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
var iter = Dygraph.createIterator(array, 1, 4,
function(array, idx) { return array[idx] !== 'd' });
- assertTrue(iter.hasNext());
- assertEquals('b', iter.peek());
+ assertTrue(iter.hasNext);
+ assertEquals('b', iter.peek);
}
UtilsTestCase.prototype.testIterator_empty = function() {
var array = [];
var iter = Dygraph.createIterator([], 0, 0);
}
UtilsTestCase.prototype.testIterator_empty = function() {
var array = [];
var iter = Dygraph.createIterator([], 0, 0);
}
UtilsTestCase.prototype.testIterator_outOfRange = function() {
var array = ['a', 'b', 'c'];
var iter = Dygraph.createIterator(array, 1, 4,
function(array, idx) { return array[idx] !== 'd' });
}
UtilsTestCase.prototype.testIterator_outOfRange = function() {
var array = ['a', 'b', 'c'];
var iter = Dygraph.createIterator(array, 1, 4,
function(array, idx) { return array[idx] !== 'd' });
- assertTrue(iter.hasNext());
- assertEquals('b', iter.peek());
+ assertTrue(iter.hasNext);
+ assertEquals('b', iter.peek);
assertNull(iter.next());
}
UtilsTestCase.prototype.testIterator_no_args = function() {
var array = ['a', 'b', 'c'];
var iter = Dygraph.createIterator(array);
assertNull(iter.next());
}
UtilsTestCase.prototype.testIterator_no_args = function() {
var array = ['a', 'b', 'c'];
var iter = Dygraph.createIterator(array);