Skip to content

Commit 142aed0

Browse files
committed
day3 prepare
1 parent d18b456 commit 142aed0

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

Sources/AdventOfCode.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import ArgumentParser
44
let allChallenges: [any AdventDay] = [
55
Day01(),
66
Day02(),
7+
Day03(),
78
]
89

910
@main

Sources/Day03.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Algorithms
2+
3+
struct Day03: AdventDay {
4+
// Save your data in a corresponding text file in the `Data` directory.
5+
var data: String
6+
7+
// add here any computed values useful for the challenge
8+
9+
func part1() -> Int {
10+
0
11+
}
12+
13+
func part2() -> Int {
14+
0
15+
}
16+
}

Tests/Day03.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import Testing
2+
3+
@testable import aoc
4+
5+
@Suite("Day03")
6+
struct Day03Tests {
7+
let testData = """
8+
9+
"""
10+
11+
@Test("part1")
12+
func testPart1() async throws {
13+
let challenge = Day03(data: testData)
14+
#expect(challenge.part1() == 0)
15+
}
16+
17+
@Test("part2")
18+
func testPart2() async throws {
19+
let challenge = Day03(data: testData)
20+
#expect(challenge.part2() == 0)
21+
}
22+
}

0 commit comments

Comments
 (0)