summaryrefslogtreecommitdiff
path: root/aoc24/src/dayX.zig
blob: 60118876d2e393b27a923d184424821d7d7eb15e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const std = @import("std");

const Input = struct {};

const test_input =
    \\
;

pub fn parse(allocator: std.mem.Allocator, data: []const u8) !Input {
    _ = allocator;
    _ = data;
    return .{};
}

test "part1" {
    var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
    defer arena.deinit();

    const output = try part1(arena.allocator(), try parse(arena.allocator(), test_input));
    try std.testing.expectEqual(1, output);
}

pub fn part1(allocator: std.mem.Allocator, input: Input) !u32 {
    _ = allocator;
    _ = input;
    return 0;
}

test "part2" {
    var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
    defer arena.deinit();

    const output = try part2(arena.allocator(), try parse(arena.allocator(), test_input));
    std.debug.print("got {}\n", .{output});
    try std.testing.expectEqual(2, output);
}

pub fn part2(allocator: std.mem.Allocator, input: Input) !u32 {
    _ = allocator;
    _ = input;
    return 0;
}