/**
 * DevExtreme (bundles/__internal/core/utils/math.test.js)
 * Version: 23.1.8 (build 24063-0109)
 * Build date: Sun Mar 03 2024
 *
 * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
"use strict";
var _math = require("../../core/utils/math");
var _jestEach = _interopRequireDefault(require("jest-each"));
var _templateObject;

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("Math utils tests", (function() {
    describe("shiftIntegerByModule", (function() {
        (0, _jestEach.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n      value         | module   | expectedResult\n      ", "          | ", "    | ", "\n      ", "          | ", "    | ", "\n      ", "          | ", "    | ", "\n      ", "          | ", " | ", "\n      ", "          | ", "    | ", "\n      ", "          | ", "    | ", "\n      ", "          | ", "    | ", "\n      ", "       | ", "   | ", "\n      ", "   | ", "   | ", "\n      ", "         | ", "    | ", "\n      ", "         | ", "    | ", "\n      ", "         | ", "    | ", "\n      ", "         | ", "    | ", "\n      ", "      | ", "   | ", "\n      ", "  | ", "   | ", "\n    "])), 0, 2, 0, 2, 2, 0, 2, 4, 2, 2, 1e3, 2, 4, 2, 0, 5, 2, 1, 6, 2, 0, 1e10, 10, 0, 10000000003, 10, 3, -9, 3, 0, -1, 6, 5, -3, 9, 6, -5, 9, 4, -1e10, 10, 0, -9999999997, 10, 3).it("should return correct result", (function(_ref) {
            var value = _ref.value,
                module = _ref.module,
                expectedResult = _ref.expectedResult;
            var result = (0, _math.shiftIntegerByModule)(value, module);
            expect(result).toEqual(expectedResult)
        }));
        it("should throw error if value isn't integer", (function() {
            expect((function() {
                return (0, _math.shiftIntegerByModule)(1.5, 3)
            })).toThrow()
        }));
        it("should throw error if module value isn't integer", (function() {
            expect((function() {
                return (0, _math.shiftIntegerByModule)(2, 2.5)
            })).toThrow()
        }));
        it("should throw error if module value equals zero", (function() {
            expect((function() {
                return (0, _math.shiftIntegerByModule)(2, 0)
            })).toThrow()
        }));
        it("should throw error if module value less than zero", (function() {
            expect((function() {
                return (0, _math.shiftIntegerByModule)(2, -2)
            })).toThrow()
        }))
    }))
}));
