3 var ArrayIterator = require('../array')
5 , slice = Array.prototype.slice;
7 module.exports = function (t, a) {
8 var i = 0, x = ['raz', 'dwa', 'trzy'], y = {}, called = 0;
10 a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#");
11 a(this, y, "Array: context: " + (i++) + "#");
14 t(x = 'foo', function () {
15 a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
16 a(this, y, "Regular String: context: " + (i++) + "#");
19 x = ['r', '💩', 'z'];
20 t('r💩z', function () {
21 a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#");
22 a(this, y, "Unicode String: context: " + (i++) + "#");
25 t(new ArrayIterator(x), function () {
26 a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#");
27 a(this, y, "Iterator: context: " + (i++) + "#");
30 t(x = ['raz', 'dwa', 'trzy'], function (value, doBreak) {
34 a(called, 1, "Break");