Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Dec 20, 2024
1 parent e70d444 commit 69378db
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions tests/unit/SanSignalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,15 @@ public static function setUpBeforeClass(): void
*/
public function e4_d5_exd5_Qxd5()
{
$movetext = '1.e4 d5 2.exd5 Qxd5';

$board = new Board();

$sanSignal = new SanSignal(self::$function, $movetext, $board);

$expectedBalance = [ 0, 1.0, 0.25, 0.50, -1.0 ];
$expectedSignal = [ 0.0, 2.0, -1.67, -0.16, -5.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];

$this->assertSame($expectedBalance, $sanSignal->balance[3]);
$this->assertSame($expectedSignal, $sanSignal->signal);
$movetext = '1.e4 d5 2.exd5 Qxd5';

$sanSignal = new SanSignal(self::$function, $movetext, new Board());

$this->assertEquals($expectedBalance, $sanSignal->balance[3]);
$this->assertEquals($expectedSignal, $sanSignal->signal);
}

/**
Expand All @@ -46,6 +44,6 @@ public function A59()

$sanSignal = new SanSignal(self::$function, $A59, new Board());

$this->assertSame($expectedSignal, $sanSignal->signal);
$this->assertEquals($expectedSignal, $sanSignal->signal);
}
}

0 comments on commit 69378db

Please sign in to comment.