mirror of
https://gitlab.com/manzerbredes/chess-move-interface.git
synced 2025-04-06 10:06:30 +02:00
23 lines
No EOL
404 B
C++
23 lines
No EOL
404 B
C++
#include "CMI.hpp"
|
|
#include <catch_amalgamated.hpp>
|
|
|
|
using namespace CMI;
|
|
|
|
#define NEW_MOVE(VAR,SAN) HalfMove *(VAR)=new HalfMove(); (VAR)->SetSAN((SAN));
|
|
|
|
|
|
HalfMove *BuildTree(){
|
|
NEW_MOVE(m1,"e4");
|
|
NEW_MOVE(m2,"e5");
|
|
m1->SetMainline(m2);
|
|
return m1;
|
|
}
|
|
|
|
|
|
TEST_CASE("CMI Tests", "[valid]") {
|
|
HalfMove *m=BuildTree();
|
|
|
|
CHECK(m->GetNumber()==1);
|
|
CHECK(m->GetMainline()->GetNumber()==1);
|
|
|
|
} |