Pickler MVP is complete. Testing For Pickler is done. changed gitignore
This commit is contained in:
3
testing/CMakeLists.txt
Normal file
3
testing/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
project(testing)
|
||||
add_executable(testing source.cpp)
|
||||
target_link_libraries(testing PickleLib)
|
||||
42
testing/source.cpp
Normal file
42
testing/source.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
#include "../includes/Pickler.h"
|
||||
void testing() {
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[]) {
|
||||
|
||||
pickle_shelf __pickle_shelf__ = pickle_shelf();
|
||||
|
||||
CREATEJAR(Pickle_Logic_Tests);
|
||||
CREATEJAR(Pickle_Deffinition_Test);
|
||||
PICKLE(Add_Pickle_Test){
|
||||
CREATEJAR(PickleAddTest);
|
||||
struct pickle p = {"Pickle_Test","testing", true};
|
||||
ADDPICKLE(PickleAddTest,p);
|
||||
struct pickle_jar test_jar = { "PickleAddTest", &p, 1, true};
|
||||
if(DIFFERENT(PickleAddTest.passed ,test_jar.passed)) {
|
||||
ASSERT("PickleAddTest.passed and test_jar.passed different", false);
|
||||
}
|
||||
if(DIFFERENT(test_jar.name, PickleAddTest.name)) {
|
||||
ASSERT("Name Not the Same",false);
|
||||
}
|
||||
if(DIFFERENT(test_jar.functionCount, PickleAddTest.functionCount)) {
|
||||
ASSERT("functionCount not the same", false);
|
||||
}
|
||||
ASSERT("",true);
|
||||
}();
|
||||
PICKLE(Test_SAME){
|
||||
ASSERT("This test should succsead", SAME(2,2));
|
||||
}();
|
||||
PICKLE(Test_DIFFERENT){
|
||||
ASSERT("This is testing if this works", DIFFERENT(1,2));
|
||||
}();
|
||||
ADDPICKLE(Pickle_Deffinition_Test,Add_Pickle_Test);
|
||||
ADDPICKLE(Pickle_Logic_Tests,Test_SAME);
|
||||
ADDPICKLE(Pickle_Logic_Tests,Test_DIFFERENT);
|
||||
PUTJARONSHLEF(Pickle_Logic_Tests);
|
||||
PUTJARONSHLEF(Pickle_Deffinition_Test);
|
||||
|
||||
return __pickle_shelf_run(&__pickle_shelf__);
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user