[ya-day1] swimmer problem WIP
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { toGetClosestPoint } from "./toGetClosestPoint.ts";
|
||||
|
||||
describe("toGetClosestPoint", () => {
|
||||
it("toGetClosestPoint equale NW", () => {
|
||||
expect(toGetClosestPoint(-1, -2, 5, 3, -4, 6)).toBe("NW");
|
||||
});
|
||||
|
||||
it("toGetClosestPoint equale N", () => {
|
||||
expect(toGetClosestPoint(-1, -2, 5, 3, 4, 5)).toBe("N");
|
||||
});
|
||||
|
||||
it("toGetClosestPoint equale NE", () => {
|
||||
expect(toGetClosestPoint(-1, -2, 5, 3, 9, 3)).toBe("NE");
|
||||
});
|
||||
|
||||
it("toGetClosestPoint equale E", () => {
|
||||
expect(toGetClosestPoint(-1, -2, 5, 3, 7, 0)).toBe("E");
|
||||
});
|
||||
|
||||
it("toGetClosestPoint equale SE", () => {
|
||||
expect(toGetClosestPoint(-1, -2, 5, 3, 8, -4)).toBe("SE");
|
||||
});
|
||||
|
||||
it("toGetClosestPoint equale S", () => {
|
||||
expect(toGetClosestPoint(-1, -2, 5, 3, 2, -4)).toBe("S");
|
||||
});
|
||||
|
||||
it("toGetClosestPoint equale SW", () => {
|
||||
expect(toGetClosestPoint(-1, -2, 5, 3, -5, -2)).toBe("SW");
|
||||
});
|
||||
|
||||
it("toGetClosestPoint equale W", () => {
|
||||
expect(toGetClosestPoint(-1, -2, 5, 3, -5, 2)).toBe("W");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user