finish day 3

This commit is contained in:
2025-12-05 22:51:17 -05:00
parent ca8f60698a
commit dea3b249eb
9 changed files with 1878 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import "core:strings"
import "core:testing"
import strconv "core:strconv"
import os "core:os"
import "../utils"
sample :: `L68
L30
@@ -85,9 +86,9 @@ solve_first_sample :: proc(t: ^testing.T) {
@(test)
solve_first_input :: proc(t: ^testing.T) {
contents, _ := os.read_entire_file("day1/input.txt")
contents := utils.read_file("day1/input.txt")
defer delete(contents)
pointing_at_zero := solve_first(string(contents))
pointing_at_zero := solve_first(contents)
testing.expect_value(t, pointing_at_zero, 1158)
}
@@ -99,8 +100,8 @@ solve_second_sample :: proc(t: ^testing.T) {
@(test)
solve_second_input :: proc(t: ^testing.T) {
contents, _ := os.read_entire_file("day1/input.txt")
contents := utils.read_file("day1/input.txt")
defer delete(contents)
pointing_at_zero := solve_second(string(contents))
pointing_at_zero := solve_second(contents)
testing.expect_value(t, pointing_at_zero, 6860)
}