-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay9Test.php
56 lines (43 loc) · 958 Bytes
/
Day9Test.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
<?php
declare(strict_types=1);
namespace XonneX\AdventOfCode\Y2021\Solutions\Day9;
use PHPUnit\Framework\TestCase;
class Day9Test extends TestCase
{
public function testSolvePartOneExample(): void
{
$day9 = new Day9();
$day9->setDebugInput(<<<TXT
2199943210
3987894921
9856789892
8767896789
9899965678
TXT
);
self::assertSame('15', $day9->solvePartOne());
}
public function testSolvePartOne(): void
{
$day9 = new Day9();
self::assertSame('633', $day9->solvePartOne());
}
public function testSolvePartTwoExample(): void
{
$day9 = new Day9();
$day9->setDebugInput(<<<TXT
2199943210
3987894921
9856789892
8767896789
9899965678
TXT
);
self::assertSame('1134', $day9->solvePartTwo());
}
public function testSolvePartTwo(): void
{
$day9 = new Day9();
self::assertSame('1050192', $day9->solvePartTwo());
}
}