]> www.ginac.de Git - cln.git/blobdiff - tests/tests.cc
cmake build: moved cl_config.h.cmake to `autoconf`
[cln.git] / tests / tests.cc
index 29a9573aa3f1565149519cf2e25055547e2ba045..d13fd580b42674b26229b2a7f68f7b554f278e39 100644 (file)
@@ -1,11 +1,14 @@
-#include <stdlib.h>
-#include <string.h>
-#include <cl_io.h>
+#include <cstdlib>
+#include <cstring>
+#include <cln/io.h>
 
 extern int test_I (int iterations);
 extern int test_MI (int iterations);
 extern int test_nt (int iterations);
 
+using namespace std;
+using namespace cln;
+
 int test_all (int iterations)
 {
        int error = 0;
@@ -18,7 +21,7 @@ int test_all (int iterations)
 int main (int argc, char* argv[])
 {
        int iterations = 10000;
-       if ((argc >= 3) && !strcmp(argv[1],"-i")) {
+       if ((argc >= 3) && !::strcmp(argv[1],"-i")) {
                iterations = atoi(argv[2]);
                argc -= 2; argv += 2;
        }
@@ -26,10 +29,10 @@ int main (int argc, char* argv[])
                exit(1);
 
        if (!test_all(iterations)) {
-               fprint (cl_stdout, "Tests passed.\n");
+               cout << "Tests passed." << endl;
                exit(0);
        } else {
-               fprint (cl_stdout, "Tests failed.\n");
+               cout << "Tests failed." << endl;
                exit(1);
        }
 }