mirror of
https://gitlab.com/manzerbredes/pgnp.git
synced 2025-04-19 03:49:43 +00:00
Improve overall parsing
This commit is contained in:
parent
fd78f92863
commit
8c77f7a054
8 changed files with 372 additions and 93 deletions
|
@ -1,6 +1,25 @@
|
|||
#include "pgnp.hpp"
|
||||
#include <catch_amalgamated.hpp>
|
||||
|
||||
using namespace pgnp;
|
||||
|
||||
TEST_CASE( "DUMMY TEST", "[test]" ) {
|
||||
REQUIRE( 1 == 1 );
|
||||
TEST_CASE("Valid PGN", "[pgn1]") {
|
||||
PGN pgn;
|
||||
REQUIRE_NOTHROW(pgn.FromFile("pgn_files/valid/pgn1.pgn"));
|
||||
REQUIRE_THROWS(pgn.STRCheck());
|
||||
REQUIRE(pgn.GetMoves()->GetLength() == 6);
|
||||
}
|
||||
|
||||
TEST_CASE("Valid PGN", "[pgn2]") {
|
||||
PGN pgn;
|
||||
REQUIRE_NOTHROW(pgn.FromFile("pgn_files/valid/pgn2.pgn"));
|
||||
REQUIRE_THROWS(pgn.STRCheck());
|
||||
REQUIRE(pgn.GetMoves()->GetLength() == 66);
|
||||
}
|
||||
|
||||
TEST_CASE("Seven Tag Roster", "[pgn1]") {
|
||||
PGN pgn;
|
||||
REQUIRE_NOTHROW(pgn.FromFile("pgn_files/str/pgn1.pgn"));
|
||||
REQUIRE_NOTHROW(pgn.STRCheck());
|
||||
REQUIRE(pgn.GetMoves()->GetLength() == 85);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue