"use strict";
/**
 * Test numeric types
 *
 *  Copyright (C) 2010-2019 R-T Specialty, LLC.
 *
 *  This file is part of the Liza Data Collection Framework.
 *
 *  liza is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as
 *  published by the Free Software Foundation, either version 3 of the
 *  License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var numeric_1 = require("../src/numeric");
describe('isPositiveInteger', function () {
    [0, 5].forEach(function (value) {
        return it("accepts positive integers (" + value + ")", function () {
            chai_1.expect(numeric_1.isPositiveInteger(value)).to.be.true;
        });
    });
    [-1, -5].forEach(function (value) {
        return it("rejects negative integers (" + value + ")", function () {
            chai_1.expect(numeric_1.isPositiveInteger(value)).to.be.false;
        });
    });
    it('asserts type PositiveInteger', function () {
        var n = 5;
        if (numeric_1.isPositiveInteger(n)) {
            // TS should recognize as PositiveInteger within this block
            checkPositiveInteger(n);
        }
    });
});
var checkPositiveInteger = function (_n) { };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtZXJpYy10ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsibnVtZXJpYy10ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQW1CRzs7QUFFSCw2QkFBNEI7QUFDNUIsMENBQWtFO0FBRWxFLFFBQVEsQ0FBQyxtQkFBbUIsRUFBRTtJQUM1QixDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBQSxLQUFLO1FBQ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