Added solution for "Day 14: Parabolic Reflector Dish", part 2

This commit is contained in:
2023-12-14 21:23:07 +01:00
committed by Stefan Müller
parent 637e7aedad
commit 22b9a24893
2 changed files with 257 additions and 6 deletions

View File

@@ -33,6 +33,7 @@ type
function CreateSolver: ISolver; override;
published
procedure TestPart1;
procedure TestPart2;
end;
{ TParabolicReflectorDishExampleTestCase }
@@ -42,6 +43,7 @@ type
function CreateSolver: ISolver; override;
published
procedure TestPart1;
procedure TestPart2;
end;
implementation
@@ -58,6 +60,11 @@ begin
AssertEquals(103614, FSolver.GetResultPart1);
end;
procedure TParabolicReflectorDishFullDataTestCase.TestPart2;
begin
AssertEquals(83790, FSolver.GetResultPart2);
end;
{ TParabolicReflectorDishExampleTestCase }
function TParabolicReflectorDishExampleTestCase.CreateSolver: ISolver;
@@ -70,6 +77,11 @@ begin
AssertEquals(136, FSolver.GetResultPart1);
end;
procedure TParabolicReflectorDishExampleTestCase.TestPart2;
begin
AssertEquals(64, FSolver.GetResultPart2);
end;
initialization
RegisterTest(TParabolicReflectorDishFullDataTestCase);