remove tests.cpp
Don't wann do unit testing gonna use cmake for end-to-end testing
This commit is contained in:
parent
14da18344a
commit
3bfe25a63e
@ -1,41 +0,0 @@
|
|||||||
// This file contains all Tests
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cstddef>
|
|
||||||
#include <iostream>
|
|
||||||
#include <iterator>
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
// Here I define all Error Codes
|
|
||||||
#define not_implemented_error 255
|
|
||||||
|
|
||||||
int test_cmdline_input_parsing() {
|
|
||||||
char *argv[] = {
|
|
||||||
(char*)"--help"
|
|
||||||
};
|
|
||||||
int argc = sizeof(argv)/sizeof(argv[0]);
|
|
||||||
|
|
||||||
return parse_cmdline_arguments(argc, argv);;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This will run all the tests
|
|
||||||
int main(void) {
|
|
||||||
int (*p[1]) () = {
|
|
||||||
test_cmdline_input_parsing
|
|
||||||
};
|
|
||||||
size_t array_size = sizeof(p)/sizeof(p[0]);
|
|
||||||
|
|
||||||
for (size_t index = 0; index < array_size; index++) {
|
|
||||||
int status_code;
|
|
||||||
status_code = p[index]();
|
|
||||||
|
|
||||||
std::cout << "test " + std::to_string(index) + ": ";
|
|
||||||
switch (status_code) {
|
|
||||||
case 0: std::cout << "passed\0";
|
|
||||||
case 1: std::cout << "failed\0";
|
|
||||||
case 255: std::cout << "not yet implemented\0";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user