"use strict";
var __values = (this && this.__values) || function (o) {
    var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
    if (m) return m.call(o);
    return {
        next: function () {
            if (o && i >= o.length) o = void 0;
            return { value: o && o[i++], done: !o };
        }
    };
};
Object.defineProperty(exports, "__esModule", { value: true });
var ava_1 = require("ava");
var selection_1 = require("./selection");
var cases = [
    {
        message: 'click (3:2)',
        start: {
            row: 3,
            col: 2,
            num: 26
        },
        end: {
            row: 3,
            col: 2,
            num: 26
        },
        expect: [
            [26] // row=0
        ]
    },
    {
        title: 'left-top to right-bottom',
        start: {
            row: 3,
            col: 2,
            num: 26
        },
        end: {
            row: 4,
            col: 3,
            num: 35
        },
        expect: [
            [26, 27],
            [34, 35] // row=1
        ]
    },
    {
        message: 'left-bottom to right-top',
        end: {
            row: 4,
            col: 3,
            num: 35
        },
        start: {
            row: 3,
            col: 4,
            num: 28
        },
        expect: [
            [27, 28],
            [35, 36] // row=1
        ]
    }
];
ava_1.default('getMatrix', function (t) {
    var e_1, _a;
    try {
        for (var cases_1 = __values(cases), cases_1_1 = cases_1.next(); !cases_1_1.done; cases_1_1 = cases_1.next()) {
            var _b = cases_1_1.value, start = _b.start, end = _b.end, expect = _b.expect, message = _b.message;
            var result = selection_1.getMatrix({ page: 0, start: start, end: end });
            t.deepEqual(result, expect, message);
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (cases_1_1 && !cases_1_1.done && (_a = cases_1.return)) _a.call(cases_1);
        }
        finally { if (e_1) throw e_1.error; }
    }
});
//# sourceMappingURL=selection.spec.js.map