-
Notifications
You must be signed in to change notification settings - Fork 0
/
Day06Test.groovy
35 lines (26 loc) · 952 Bytes
/
Day06Test.groovy
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
package be.vreijsenj.aoc.days
import spock.lang.Specification
class Day06Test extends Specification {
def "returns number of ways to beat the current records"() {
given: "the race times and records"
def input = [
"Time: 7 15 30",
"Distance: 9 40 200"
]
when: "the ways to beat the records are determined"
def result = new Day06().runPartOne(input)
then: "result matches the example answer"
result == 288
}
def "returns number of ways to beat the current records"() {
given: "the race times and records"
def input = [
"Time: 71530",
"Distance: 940200"
]
when: "the ways to beat the records are determined"
def result = new Day06().runPartTwo(input)
then: "result matches the example answer"
result == 71503
}
}