"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 Plan_1 = __importDefault(require("../../../../system/f/control/Plan"));
const system_1 = require("../../../util/system");
const plan = new Plan_1.default(system_1.system);
plan.play();
false && (0, debug_1.watchUnitAndLog)(plan);
plan.push('a', 0);
assert_1.default.equal(plan.peakInput('a'), 0);
assert_1.default.equal(plan.take('0'), 0);
assert_1.default.equal(plan.take('0'), undefined);
assert_1.default.equal(plan.peakInput('a'), 0);
assert_1.default.equal(plan.take('1'), 0);
assert_1.default.equal(plan.take('1'), undefined);
assert_1.default.equal(plan.peakInput('a'), undefined);
plan.push('a', 1);
assert_1.default.equal(plan.peakInput('a'), 1);
assert_1.default.equal(plan.peak('0'), 1);
plan.push('a', 2);
assert_1.default.equal(plan.peakInput('a'), 2);
assert_1.default.equal(plan.take('0'), 2);
assert_1.default.equal(plan.take('0'), undefined);
assert_1.default.equal(plan.take('1'), 2);
assert_1.default.equal(plan.take('1'), undefined);
assert_1.default.equal(plan.peakInput('a'), undefined);
plan.push('a', 3);
assert_1.default.equal(plan.peakInput('a'), 3);
assert_1.default.equal(plan.peak('0'), 3);
assert_1.default.equal(plan.takeInput('a'), 3);
assert_1.default.equal(plan.peak('0'), undefined);
plan.setOutputIgnored('0', true);
plan.push('a', 4);
assert_1.default.equal(plan.take('1'), 4);
// // infinite loop
// plan.setInputConstant('a', true)
// plan.setOutputIgnored('0', true)
// plan.setOutputIgnored('1', true)
// plan.push('a', 1)
//# sourceMappingURL=Plan.js.map