"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/loop/RangeBounce/spec.json');
const RangeBounce = (0, fromSpec_1.fromSpec)(spec, _specs_1.default, {});
const rangeBounce = new RangeBounce(system_1.system);
false && (0, debug_1.watchUnitAndLog)(rangeBounce);
false && (0, debug_1.watchGraphAndLog)(rangeBounce);
rangeBounce.play();
rangeBounce.push('a', 5);
rangeBounce.push('b', 5);
assert_1.default.equal(rangeBounce.take('i'), undefined);
assert_1.default.equal(rangeBounce.peakInput('a'), undefined);
assert_1.default.equal(rangeBounce.peakInput('b'), undefined);
rangeBounce.push('a', 0);
rangeBounce.push('b', 2);
assert_1.default.equal(rangeBounce.take('i'), 0);
assert_1.default.equal(rangeBounce.take('i'), 1);
assert_1.default.equal(rangeBounce.take('i'), 1);
assert_1.default.equal(rangeBounce.take('i'), 0);
assert_1.default.equal(rangeBounce.peakInput('a'), undefined);
assert_1.default.equal(rangeBounce.peakInput('b'), undefined);
// // infinite loop
// rangeBounce.setInputConstant('a', true)
// rangeBounce.setInputConstant('b', true)
// rangeBounce.setOutputIgnored('i', true)
// rangeBounce.push('a', 0)
// rangeBounce.push('b', 1)
// // infinite loop
// rangeBounce.setInputConstant('a', true)
// rangeBounce.setInputConstant('b', true)
// rangeBounce.setOutputIgnored('i', true)
// rangeBounce.push('a', -100)
// rangeBounce.push('b', 100)
//# sourceMappingURL=RangeBounce.js.map