feat(day_6): part A done and B tried with dirty strategy
This commit is contained in:
22
src/__tests__/day_6_test.ts
Normal file
22
src/__tests__/day_6_test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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);
|
||||
});
|
||||
Reference in New Issue
Block a user