23 lines
584 B
TypeScript
23 lines
584 B
TypeScript
import { assertEquals } from "@std/assert";
|
|
import {
|
|
operate,
|
|
read_problems,
|
|
read_problems_as_cephalopod,
|
|
} from "../exercises/day_6.ts";
|
|
|
|
Deno.test("Day 6 - A", async () => {
|
|
const problem_list = await read_problems(
|
|
"src/exercises/assets/day_6_test_input.txt",
|
|
);
|
|
const result = operate(problem_list);
|
|
assertEquals(result, 4277556);
|
|
});
|
|
|
|
Deno.test("Day 6 - B", async () => {
|
|
const problem_list = await read_problems_as_cephalopod(
|
|
"src/exercises/assets/day_6_test_input.txt",
|
|
);
|
|
const result = operate(problem_list);
|
|
assertEquals(result, 3263827);
|
|
});
|