"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 fromSpec_1 = require("../../../spec/fromSpec");
const _specs_1 = __importDefault(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_1.default.equal(loopForever.take('current'), 0);
assert_1.default.equal(loopForever.take('current'), undefined);
assert_1.default.equal(loopForever.peakInput('init'), 0);
loopForever.push('next', 1);
assert_1.default.equal(loopForever.peakInput('next'), undefined);
assert_1.default.equal(loopForever.take('current'), 1);
assert_1.default.equal(loopForever.take('current'), undefined);
loopForever.push('init', 0);
assert_1.default.equal(loopForever.take('current'), 0);
assert_1.default.equal(loopForever.take('current'), undefined);
loopForever.push('init', 0);
assert_1.default.equal(loopForever.peak('current'), 0);
loopForever.push('next', 1);
assert_1.default.equal(loopForever.peak('current'), 0);
assert_1.default.equal(loopForever.peakInput('next'), undefined);
loopForever.push('next', 2);
assert_1.default.equal(loopForever.peak('current'), 0);
assert_1.default.equal(loopForever.peakInput('next'), 2);
assert_1.default.equal(loopForever.take('current'), 0);
assert_1.default.equal(loopForever.take('current'), 1);
assert_1.default.equal(loopForever.take('current'), 2);
assert_1.default.equal(loopForever.take('current'), undefined);
//# sourceMappingURL=LoopForever.js.map