You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
2.3 KiB
TypeScript
82 lines
2.3 KiB
TypeScript
import { describe, it, expect } from "vitest";
|
|
import { tiShortChoser } from "./tiShortChoser.ts";
|
|
|
|
describe("tiShortChoser", () => {
|
|
it("N1 | 6, 2, 7, 3", () => {
|
|
expect(tiShortChoser(6, 2, 7, 3)).toEqual("3 4");
|
|
});
|
|
|
|
it("N2 | 1, 1, 1, 1", () => {
|
|
expect(tiShortChoser(1, 1, 1, 1)).toEqual("2 1");
|
|
});
|
|
|
|
it("N3 | 10, 10, 10, 10", () => {
|
|
expect(tiShortChoser(10, 10, 10, 10)).toEqual("11 1");
|
|
});
|
|
it("N4 0, 2, 5, 1", () => {
|
|
expect(tiShortChoser(0, 2, 5, 1)).toEqual("1 6");
|
|
});
|
|
it("N5 9, 0, 5, 2", () => {
|
|
expect(tiShortChoser(9, 0, 5, 2)).toEqual("1 3");
|
|
});
|
|
it("N6 | 10, 7, 0, 4", () => {
|
|
expect(tiShortChoser(10, 7, 0, 4)).toEqual("11 1");
|
|
});
|
|
it("N6.1 | 7, 10, 0, 4", () => {
|
|
expect(tiShortChoser(7, 10, 0, 4)).toEqual("8 1");
|
|
});
|
|
|
|
it("N7 | 0, 1, 1, 1", () => {
|
|
expect(tiShortChoser(0, 1, 1, 1)).toEqual("1 2");
|
|
});
|
|
|
|
it("tiShortChoser 1, 0, 1, 1", () => {
|
|
expect(tiShortChoser(1, 0, 1, 1)).toEqual("1 2");
|
|
});
|
|
it("tiShortChoser 1, 1, 0, 1", () => {
|
|
expect(tiShortChoser(1, 1, 0, 1)).toEqual("2 1");
|
|
});
|
|
it("tiShortChoser 1, 1, 1, 0", () => {
|
|
expect(tiShortChoser(1, 1, 1, 0)).toEqual("2 1");
|
|
});
|
|
it("tiShortChoser 0, 1, 0, 1", () => {
|
|
expect(tiShortChoser(0, 1, 0, 1)).toEqual("1 1");
|
|
});
|
|
it("tiShortChoser 6, 1, 8, 4", () => {
|
|
expect(tiShortChoser(6, 1, 8, 4)).toEqual("2 5");
|
|
});
|
|
it("tiShortChoser 0, 8, 0, 8", () => {
|
|
expect(tiShortChoser(0, 8, 0, 8)).toEqual("1 1");
|
|
});
|
|
it("tiShortChoser 1, 1, 4, 6", () => {
|
|
expect(tiShortChoser(1, 1, 4, 6)).toEqual("2 1");
|
|
});
|
|
// it("tiShortChoser 5, 7, 7, 3", () => {
|
|
// expect(tiShortChoser(5, 7, 3, 2)).toEqual("6 3");
|
|
// });
|
|
// it("tiShortChoser 5, 0, 7, 3", () => {
|
|
// expect(tiShortChoser(5, 0, 7, 3)).toEqual("1 4");
|
|
// });
|
|
// it("tiShortChoser 0, 1, 7, 3", () => {
|
|
// expect(tiShortChoser(0, 1, 17, 50)).toEqual("1 18");
|
|
// });
|
|
// it("tiShortChoser 1000, 1, 1, 1000 ", () => {
|
|
// expect(tiShortChoser(1000, 1, 1, 1000)).toEqual("1 18");
|
|
// });
|
|
// it("tiShortChoser 1000, 1, 1000, 1 ", () => {
|
|
// expect(tiShortChoser(1000, 1, 1000, 1)).toEqual("1 18");
|
|
// });
|
|
});
|
|
|
|
|
|
// 0 1 0 1 | 1 1
|
|
// 0 8 0 8 | 1 1
|
|
// 1 1 4 6 | 2 1
|
|
// 10, 10, 10, 10
|
|
// --------------
|
|
//
|
|
// 4 4 4 6 | 5 1
|
|
// 8 9 5 9 | 10 1
|
|
// 1000 1 1000 1 | 2 1
|
|
// 1000 1 1 1000 | 1001 1
|