"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/common/LoopForever/spec.json');
const LoopForever = (0, fromSpec_1.fromSpec)(spec, _specs_1.default);
const loopForever = new LoopForever(system_1.system);
false && (0, debug_1.watchUnitAndLog)(loopForever);
false && (0, debug_1.watchGraphAndLog)(loopForever);
loopForever.play();
loopForever.push('init', 0);
assert.equal(loopForever.take('current'), 0);
assert.equal(loopForever.take('current'), undefined);
assert.equal(loopForever.peakInput('init'), 0);
loopForever.push('next', 1);
assert.equal(loopForever.peakInput('next'), undefined);
assert.equal(loopForever.take('current'), 1);
assert.equal(loopForever.take('current'), undefined);
loopForever.push('init', 0);
assert.equal(loopForever.take('current'), 0);
assert.equal(loopForever.take('current'), undefined);
loopForever.push('init', 0);
assert.equal(loopForever.peak('current'), 0);
loopForever.push('next', 1);
assert.equal(loopForever.peak('current'), 0);
assert.equal(loopForever.peakInput('next'), undefined);
loopForever.push('next', 2);
assert.equal(loopForever.peak('current'), 0);
assert.equal(loopForever.peakInput('next'), 2);
assert.equal(loopForever.take('current'), 0);
assert.equal(loopForever.take('current'), 1);
assert.equal(loopForever.take('current'), 2);
assert.equal(loopForever.take('current'), undefined);
//# sourceMappingURL=LoopForever.js.map