finish day 3
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user