"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 Lazy_1 = require("../../spec/Lazy");
const fromSpec_1 = require("../../spec/fromSpec");
const _ids_1 = require("../../system/_ids");
const _specs_1 = __importDefault(require("../../system/_specs"));
const system_1 = require("../util/system");
const LazyRange = (0, Lazy_1.lazyFromSpec)(_specs_1.default[_ids_1.ID_RANGE], _specs_1.default, {}, fromSpec_1.fromSpec);
const lazyRange = new LazyRange(system_1.system, _ids_1.ID_RANGE);
lazyRange.play();
lazyRange.setOutputIgnored('test', true);
false && (0, debug_1.watchUnitAndLog)(lazyRange);
lazyRange.push('a', 0);
lazyRange.push('b', 1);
assert_1.default.equal(lazyRange.take('i'), 0);
assert_1.default.equal(lazyRange.take('i'), undefined);
lazyRange.push('a', 0);
lazyRange.push('b', 2);
assert_1.default.equal(lazyRange.take('i'), 0);
assert_1.default.equal(lazyRange.take('i'), 1);
assert_1.default.equal(lazyRange.take('i'), undefined);
lazyRange.push('a', 2);
lazyRange.push('b', 5);
assert_1.default.equal(lazyRange.take('i'), 2);
assert_1.default.equal(lazyRange.take('i'), 3);
assert_1.default.equal(lazyRange.take('i'), 4);
assert_1.default.equal(lazyRange.take('i'), undefined);
//# sourceMappingURL=Lazy.js.map