Added tests for C API

This commit is contained in:
Paul-Louis Ageneau
2020-03-08 20:06:56 +01:00
parent 56198372fd
commit be04d8037e
9 changed files with 317 additions and 49 deletions

View File

@ -21,14 +21,24 @@
using namespace std;
void test_connectivity();
void test_capi();
int main(int argc, char **argv) {
try {
std::cout << "*** Running connectivity test..." << std::endl;
test_connectivity();
std::cout << "*** Finished connectivity test" << std::endl;
} catch (const exception &e) {
std::cerr << "Connectivity check failed: " << e.what() << endl;
std::cerr << "Connectivity test failed: " << e.what() << endl;
return -1;
}
try {
std::cout << "*** Running C API test..." << std::endl;
test_capi();
std::cout << "*** Finished C API test" << std::endl;
} catch (const exception &e) {
std::cerr << "C API test failed: " << e.what() << endl;
return -1;
}
return 0;
}