"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const assert = require("assert");
const debug_1 = require("../../../debug");
const fromSpec_1 = require("../../../spec/fromSpec");
const _specs_1 = require("../../../system/_specs");
const system_1 = require("../../util/system");
const spec = require('../../../system/core/array/ForEach/spec.json');
const ForEach = (0, fromSpec_1.fromSpec)(spec, _specs_1.default);
const forEach = new ForEach(system_1.system);
false && (0, debug_1.watchUnitAndLog)(forEach);
false && (0, debug_1.watchGraphAndLog)(forEach);
false && (0, debug_1.watchTreeAndLog)(forEach);
forEach.play();
forEach.setOutputIgnored('a', true);
forEach.setOutputIgnored('i', true);
// forEach.push('a', [])
// assert.equal(forEach.take('test'), false)
// assert.equal(forEach.take('a[i]'), undefined)
// assert.equal(forEach.peakInput('a'), undefined)
forEach.push('a', [0]);
assert.equal(forEach.take('test'), true);
assert.equal(forEach.take('a[i]'), 0);
assert.equal(forEach.take('test'), false);
assert.equal(forEach.take('a[i]'), undefined);
assert.equal(forEach.peakInput('a'), undefined);
// forEach.push('a', [0, 1, 2])
// assert.equal(forEach.take('test'), true)
// assert.equal(forEach.take('a[i]'), 0)
// assert.equal(forEach.take('test'), true)
// assert.equal(forEach.take('a[i]'), 1)
// assert.equal(forEach.take('test'), true)
// assert.equal(forEach.take('a[i]'), 2)
// assert.equal(forEach.take('test'), false)
// assert.equal(forEach.take('a[i]'), undefined)
// assert.equal(forEach.peakInput('a'), undefined)
// forEach.push('a', [0, 1, 2])
// assert.equal(forEach.take('test'), true)
// assert.equal(forEach.take('a[i]'), 0)
// assert.deepEqual(forEach.takeInput('a'), [0, 1, 2])
// assert.equal(forEach.take('test'), undefined)
// assert.equal(forEach.take('a[i]'), undefined)
// forEach.push('a', [0, 1, 2])
// assert.equal(forEach.take('test'), true)
// assert.equal(forEach.take('a[i]'), 0)
// assert.equal(forEach.take('test'), true)
// assert.equal(forEach.take('a[i]'), 1)
// assert.equal(forEach.take('test'), true)
// assert.equal(forEach.take('a[i]'), 2)
// assert.equal(forEach.take('test'), false)
// assert.equal(forEach.take('a[i]'), undefined)
// assert.equal(forEach.peakInput('a'), undefined)
// forEach.push('a', [0, 1])
// assert.equal(forEach.take('test'), true)
// assert.equal(forEach.take('a[i]'), 0)
// forEach.push('a', [0, 1, 2])
// assert.equal(forEach.take('test'), true)
// assert.equal(forEach.take('a[i]'), 0)
// assert.equal(forEach.take('test'), true)
// assert.equal(forEach.take('a[i]'), 1)
// assert.equal(forEach.take('test'), true)
// assert.equal(forEach.take('a[i]'), 2)
// assert.equal(forEach.take('test'), false)
// assert.equal(forEach.take('a[i]'), undefined)
// assert.equal(forEach.peakInput('a'), undefined)
// forEach.setOutputIgnored('test', true)
// forEach.setInputConstant('a', true)
// forEach.push('a', [0, 1, 2, 3])
// assert.equal(forEach.take('a[i]'), 0)
// assert.equal(forEach.take('a[i]'), 1)
// assert.equal(forEach.take('a[i]'), 2)
// assert.equal(forEach.take('a[i]'), 3)
// assert.equal(forEach.take('a[i]'), 0)
// assert.equal(forEach.take('a[i]'), 1)
// assert.equal(forEach.take('a[i]'), 2)
// assert.equal(forEach.take('a[i]'), 3)
// assert.equal(forEach.take('a[i]'), 0)
// assert.equal(forEach.take('a[i]'), 1)
// assert.equal(forEach.take('a[i]'), 2)
// assert.equal(forEach.take('a[i]'), 3)
//# sourceMappingURL=ForEach.js.map