diff options
author | zedarider <ymherklotz@gmail.com> | 2016-11-25 23:24:19 +0000 |
---|---|---|
committer | zedarider <ymherklotz@gmail.com> | 2016-11-25 23:24:19 +0000 |
commit | 4a876b0d57566fc3f26c5f2db9ee7427854d468b (patch) | |
tree | 254f95c76b23d783172d44a22b03eb008e3ec726 /src/test_bench.cpp | |
parent | b12a0df92452c8da471e36218effadd6f5958556 (diff) | |
download | ChessAI-4a876b0d57566fc3f26c5f2db9ee7427854d468b.tar.gz ChessAI-4a876b0d57566fc3f26c5f2db9ee7427854d468b.zip |
starting building the testbench
Diffstat (limited to 'src/test_bench.cpp')
-rw-r--r-- | src/test_bench.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/test_bench.cpp b/src/test_bench.cpp new file mode 100644 index 0000000..68c93fb --- /dev/null +++ b/src/test_bench.cpp @@ -0,0 +1,48 @@ +/* + + description: This is the test_bench file for the chess_ai + + author: Yann Herklotz <ymherklotz@gmail.com> + date created: DD-MM-YYYY + + */ + +#include "chess_ai.hpp" +#include "chess_tester.hpp" + +#include <iostream> + +using namespace std; +using namespace chess_ai; + +int main(int argc, char** argv) { + (void)argc; + (void)argv; + + int test_id; + bool passed; + + chess_tester test_bench; + + chess_board empty_board(clear); + chess_board initial_board(initial); + + test_bench.chess_begin_test_suite(); + + test_id = test_bench.chess_begin_test("PAWN"); + chess_piece piece(pawn, white, 1, 6); + empty_board.set_piece(piece); + empty_board.print_board(); + cout << empty_board.move_piece(1, 6, 1, 4) << endl; + piece.set(pawn, white, 1, 4); + if(empty_board.at(1, 4) == piece) + passed = true; + else + passed = false; + empty_board.print_board(); + test_bench.chess_end_test(test_id, passed); + + test_bench.chess_end_test_suite(); + + return 0; +} |