-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay12Test.php
64 lines (49 loc) · 1.08 KB
/
Day12Test.php
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
declare(strict_types=1);
namespace XonneX\AdventOfCode\Y2020\Solutions\Day12;
use PHPUnit\Framework\TestCase;
class Day12Test extends TestCase
{
public function testSolvePartOneExample(): void
{
$day12 = new Day12();
$day12->setDebugInput(<<<TXT
F10
N3
F7
R90
F11
TXT
);
self::assertSame('25', $day12->solvePartOne());
}
public function testSolvePartOneWrong(): void
{
$day12 = new Day12();
self::assertNotSame('761', $day12->solvePartOne());
self::assertTrue($day12->solvePartOne() > 761);
}
public function testSolvePartOne(): void
{
$day12 = new Day12();
self::assertSame('1565', $day12->solvePartOne());
}
public function testSolvePartTwoExample(): void
{
$day12 = new Day12();
$day12->setDebugInput(<<<TXT
F10
N3
F7
R90
F11
TXT
);
self::assertSame('286', $day12->solvePartTwo());
}
public function testSolvePartTwo(): void
{
$day12 = new Day12();
self::assertSame('78883', $day12->solvePartTwo());
}
}