edit test_game_copy now testing option wrapping
This commit is contained in:
1 parent
640e426f44
commit
73d1835dc9
1 file changed
+3
-1
@@ -178,7 +178,8 @@ bool test_game_new_empty() {
|
||||
bool test_game_copy() {
|
||||
square tab_square[] = {S_BLANK, S_LIGHTBULB, S_MARK, S_BLACK0, S_BLACK1, S_BLACK2, S_BLACK3, S_BLACK4, S_BLACKU};
|
||||
uint index_tab = 0;
|
||||
game g1 = game_new_empty();
|
||||
for(int wrap = 0; wrap < 2 /*we only need to test two versions (with and without wrapping)*/; wrap++){
|
||||
game g1 = game_new_empty_ext(DEFAULT_SIZE, DEFAULT_SIZE, wrap);
|
||||
for (int i = 0; i < game_nb_rows(g1); i++) {
|
||||
for (int j = 0; j < game_nb_cols(g1); j++) {
|
||||
// check if index_tab reach end of tab
|
||||
@@ -198,6 +199,7 @@ bool test_game_copy() {
|
||||
}
|
||||
game_delete(g1);
|
||||
game_delete(g2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user