mirror of
https://github.com/daylinmorgan/advent-of-code-2023.git
synced 2024-12-22 03:10:44 -06:00
no need for separate test file
This commit is contained in:
parent
3759966ea6
commit
19f37ece40
1 changed files with 8 additions and 17 deletions
|
@ -30,27 +30,18 @@ proc partOne*(input: string): int = 0
|
||||||
proc partTwo*(input: string): int = 0
|
proc partTwo*(input: string): int = 0
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
echo partOne(example)
|
import std/unittest
|
||||||
echo partOne(input)
|
|
||||||
echo partTwo(example)
|
|
||||||
echo partTwo(input)
|
|
||||||
"""
|
|
||||||
let test = fmt"""
|
|
||||||
import std/unittest
|
|
||||||
import ./solution
|
|
||||||
|
|
||||||
suite "day {day}":
|
suite "day {day}":
|
||||||
test "part one":
|
test "part one":
|
||||||
check partOne(example) == 0
|
check partOne(example) == 0
|
||||||
check partOne(input) == 0
|
check partOne(input) == 0
|
||||||
test "part two":
|
test "part two":
|
||||||
check partTwo(example) == 0
|
check partTwo(example) == 0
|
||||||
check partTwo(input) == 0
|
check partTwo(input) == 0
|
||||||
|
|
||||||
"""
|
"""
|
||||||
let d = fmt"solutions/day{day:0>2}"
|
let d = fmt"solutions/day{day:0>2}"
|
||||||
writeFile(d / "solution.nim", solution)
|
writeFile(d / "solution.nim", solution)
|
||||||
writeFile(d / "test.nim", test)
|
|
||||||
|
|
||||||
proc newDay(year, day: int) =
|
proc newDay(year, day: int) =
|
||||||
let d = fmt"solutions/day{day:0>2}"
|
let d = fmt"solutions/day{day:0>2}"
|
||||||
|
|
Loading…
Reference in a new issue