/**
 * DevExtreme (cjs/__internal/scheduler/options_validator/common/validation_functions.test.js)
 * Version: 23.2.6 (build 24140-0112)
 * Build date: Sun May 19 2024
 *
 * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
"use strict";
var _jestEach = _interopRequireDefault(require("jest-each"));
var _validation_functions = require("./validation_functions");
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;

function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    }
}

function _taggedTemplateLiteral(strings, raw) {
    if (!raw) {
        raw = strings.slice(0)
    }
    return Object.freeze(Object.defineProperties(strings, {
        raw: {
            value: Object.freeze(raw)
        }
    }))
}
describe("isInteger", () => {
    (0, _jestEach.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n    value   | expectedResult\n    ", "    | ", "\n    ", "  | ", "\n    ", "   | ", "\n    ", " | ", "\n    ", "    | ", "\n  "])), 1, true, 1.5, false, -1, true, -1.5, false, 0, true).it("should detect integer correctly", _ref => {
        let {
            value: value,
            expectedResult: expectedResult
        } = _ref;
        const result = (0, _validation_functions.isInteger)(value);
        expect(result).toEqual(expectedResult)
    })
});
describe("greaterThat", () => {
    (0, _jestEach.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n    value   | min     | strict    | expectedResult\n    ", "   | ", "    | ", "   | ", "\n    ", "   | ", "   | ", "   | ", "\n    ", "   | ", "   | ", "   | ", "\n    ", "    | ", "    | ", "   | ", "\n    ", "  | ", "  | ", "   | ", "\n    ", "  | ", "   | ", "   | ", "\n    ", "  | ", "  | ", "   | ", "\n    ", "   | ", "    | ", "  | ", "\n    ", "   | ", "   | ", "  | ", "\n    ", "   | ", "   | ", "  | ", "\n    ", "    | ", "    | ", "  | ", "\n    ", "  | ", "  | ", "  | ", "\n    ", "  | ", "   | ", "  | ", "\n    ", "  | ", "  | ", "  | ", "\n  "])), 10, 5, true, true, 10, 15, true, false, 10, 10, true, false, 0, 0, true, false, -10, -10, true, false, -10, -5, true, false, -10, -15, true, true, 10, 5, false, true, 10, 15, false, false, 10, 10, false, true, 0, 0, false, true, -10, -10, false, true, -10, -5, false, false, -10, -15, false, true).it("should compare numbers correctly", _ref2 => {
        let {
            value: value,
            min: min,
            strict: strict,
            expectedResult: expectedResult
        } = _ref2;
        const result = (0, _validation_functions.greaterThan)(value, min, strict);
        expect(result).toEqual(expectedResult)
    })
});
describe("lessThat", () => {
    (0, _jestEach.default)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n    value   | min     | strict    | expectedResult\n    ", "   | ", "    | ", "   | ", "\n    ", "   | ", "   | ", "   | ", "\n    ", "   | ", "   | ", "   | ", "\n    ", "    | ", "    | ", "   | ", "\n    ", "  | ", "  | ", "   | ", "\n    ", "  | ", "   | ", "   | ", "\n    ", "  | ", "  | ", "   | ", "\n    ", "   | ", "    | ", "  | ", "\n    ", "   | ", "   | ", "  | ", "\n    ", "   | ", "   | ", "  | ", "\n    ", "    | ", "    | ", "  | ", "\n    ", "  | ", "  | ", "  | ", "\n    ", "  | ", "   | ", "  | ", "\n    ", "  | ", "  | ", "  | ", "\n  "])), 10, 5, true, false, 10, 15, true, true, 10, 10, true, false, 0, 0, true, false, -10, -10, true, false, -10, -5, true, true, -10, -15, true, false, 10, 5, false, false, 10, 15, false, true, 10, 10, false, true, 0, 0, false, true, -10, -10, false, true, -10, -5, false, true, -10, -15, false, false).it("should compare numbers correctly", _ref3 => {
        let {
            value: value,
            min: min,
            strict: strict,
            expectedResult: expectedResult
        } = _ref3;
        const result = (0, _validation_functions.lessThan)(value, min, strict);
        expect(result).toEqual(expectedResult)
    })
});
describe("inRange", () => {
    (0, _jestEach.default)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n    value | range         | expectedResult\n    ", "  | ", "  | ", "\n    ", "  | ", "    | ", "\n    ", "  | ", "   | ", "\n    ", "  | ", "   | ", "\n    ", "  | ", "    | ", "\n    ", " | ", "  | ", "\n    ", " | ", "    | ", "\n    ", " | ", "  | ", "\n    ", " | ", "  | ", "\n    ", " | ", "    | ", "\n  "])), 5, [-10, 10], true, 5, [5, 10], true, 5, [-10, 5], true, 5, [-10, 4], false, 5, [6, 10], false, -5, [-10, 10], true, -5, [-5, 0], true, -5, [-10, -5], true, -5, [-10, -6], false, -5, [-4, 0], false).it("should determine interval correctly", _ref4 => {
        let {
            value: value,
            range: range,
            expectedResult: expectedResult
        } = _ref4;
        const result = (0, _validation_functions.inRange)(value, range);
        expect(result).toEqual(expectedResult)
    })
});
describe("divisibleBy", () => {
    (0, _jestEach.default)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n    value  | divider  | expectedResult\n    ", "   | ", "     | ", "\n    ", "   | ", "     | ", "\n    ", "   | ", "   | ", "\n    ", "   | ", "     | ", "\n    ", "   | ", "     | ", "\n    ", "   | ", "   | ", "\n    ", "  | ", "     | ", "\n    ", "  | ", "     | ", "\n    ", "   | ", "     | ", "\n    ", "   | ", "     | ", "\n  "])), 4, 2, true, 5, 2, false, 0, 111, true, 4, -2, true, 5, -2, false, 0, -111, true, -4, 2, true, -5, 2, false, 4, -2, true, 5, -2, false).it("should determine divisible by correctly", _ref5 => {
        let {
            value: value,
            divider: divider,
            expectedResult: expectedResult
        } = _ref5;
        const result = (0, _validation_functions.divisibleBy)(value, divider);
        expect(result).toEqual(expectedResult)
    })
});
