Created
January 7, 2011 13:35
-
-
Save ElemarJR/769456 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Este teste verifica o bit mais alto ligado em um bitboard | |
// (ver minha série sobre xadrez [http://elemarjr.net]) para entender o contexto | |
// Não só mais de um assert faz sentido, como a lógica no teste | |
// O equivalente a esse teste seriam 64 testes individuais (muito trabalho para pouco resultado, não acha) | |
[Test] | |
public void GetLeadingSquare_EverySquare() | |
{ | |
var bitboard = new Bitboard(); | |
for (int i = 0; i < 64; i++) | |
{ | |
var sq = new Square(i); | |
bitboard = bitboard.Set(sq); | |
bitboard.LeadingSquare.Value.Should().Be(sq); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment