extracted the assert equals to another file to
have mulitple test files
This commit is contained in:
parent
4792daf127
commit
53a0755547
@ -1,20 +1,5 @@
|
|||||||
#include "../board.cpp"
|
#include "../board.cpp"
|
||||||
|
#include "lib.cpp"
|
||||||
#define IS_TRUE(x) \
|
|
||||||
{ \
|
|
||||||
if (!(x)) \
|
|
||||||
std::cout << __FUNCTION__ << " failed on line " << __LINE__ \
|
|
||||||
<< std::endl; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ASSERT_EQUALS(expected, actual) \
|
|
||||||
{ \
|
|
||||||
if (expected != actual) \
|
|
||||||
std::cout << "Expected: " << std::endl \
|
|
||||||
<< '\t' << expected << std::endl \
|
|
||||||
<< "Got: " << std::endl \
|
|
||||||
<< '\t' << actual << std::endl; \
|
|
||||||
}
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
std::string pos = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR";
|
std::string pos = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR";
|
||||||
|
10
cpp/tests/lib.cpp
Normal file
10
cpp/tests/lib.cpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define ASSERT_EQUALS(expected, actual) \
|
||||||
|
{ \
|
||||||
|
if (expected != actual) \
|
||||||
|
std::cout << "Expected: " << std::endl \
|
||||||
|
<< '\t' << expected << std::endl \
|
||||||
|
<< "Got: " << std::endl \
|
||||||
|
<< '\t' << actual << std::endl; \
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user