-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay16Test.groovy
50 lines (42 loc) · 1.42 KB
/
Day16Test.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package be.vreijsenj.aoc.days
import spock.lang.Specification
class Day16Test extends Specification {
def "returns the amount of energized tiles"() {
given: "the contraption input"
def input = [
".|...\\....",
"|.-.\\.....",
".....|-...",
"........|.",
"..........",
".........\\",
"..../.\\\\..",
".-.-/..|..",
".|....-|.\\",
"..//.|....",
]
when: "the beam trajectory is calculated"
def result = new Day16().runPartOne(input)
then: "the result matches the example answer"
result == 46
}
def "returns the maximum amount of energized tiles"() {
given: "the contraption input"
def input = [
".|...\\....",
"|.-.\\.....",
".....|-...",
"........|.",
"..........",
".........\\",
"..../.\\\\..",
".-.-/..|..",
".|....-|.\\",
"..//.|....",
]
when: "the energized tiles are calculated"
def result = new Day16().runPartTwo(input)
then: "the result matches the example answer"
result == 51
}
}