"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const assert_1 = __importDefault(require("assert"));
const debug_1 = require("../../../../debug");
const Iterate_1 = __importDefault(require("../../../../system/f/control/Iterate"));
const system_1 = require("../../../util/system");
const iterate = new Iterate_1.default(system_1.system);
false && (0, debug_1.watchUnitAndLog)(iterate);
iterate.play();
iterate.push('init', 0);
assert_1.default.equal(iterate.peakInput('init'), 0);
assert_1.default.equal(iterate.peakOutput('current'), 0);
assert_1.default.equal(iterate.peakOutput('local'), 0);
iterate.push('next', 1);
assert_1.default.equal(iterate.peakOutput('current'), 1);
assert_1.default.equal(iterate.takeOutput('local'), 0);
assert_1.default.equal(iterate.peakOutput('local'), 1);
assert_1.default.equal(iterate.peakInput('init'), 0);
assert_1.default.equal(iterate.peakInput('next'), undefined);
assert_1.default.equal(iterate.takeOutput('current'), 1);
assert_1.default.equal(iterate.peakInput('init'), undefined);
iterate.push('init', 2);
assert_1.default.equal(iterate.peakOutput('current'), 2);
assert_1.default.equal(iterate.takeOutput('local'), 2);
assert_1.default.equal(iterate.takeInput('init'), 2);
assert_1.default.equal(iterate.peakOutput('current'), undefined);
iterate.push('init', 3);
assert_1.default.equal(iterate.peakOutput('current'), 3);
assert_1.default.equal(iterate.take('local'), 3);
iterate.push('next', 4);
assert_1.default.equal(iterate.peakInput('next'), undefined);
assert_1.default.equal(iterate.peakOutput('current'), 4);
assert_1.default.equal(iterate.take('local'), 4);
iterate.push('next', 5);
assert_1.default.equal(iterate.peakInput('next'), undefined);
assert_1.default.equal(iterate.peakOutput('current'), 5);
assert_1.default.equal(iterate.take('local'), 5);
//# sourceMappingURL=Iterate.js.map