basictest.cpp 672 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // basictest.cpp : Sets the entry point for the console application.
  2. //
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #ifndef _WIN32
  7. #include <unistd.h>
  8. #endif
  9. #include "../common/core.h"
  10. #include "test_thread.hpp"
  11. #include "test_spinlock.hpp"
  12. using namespace ra::unit_tests;
  13. int do_init( int, char** )
  14. {
  15. test_thread_creation_and_wait();
  16. test_thread_spinlock();
  17. return 0;
  18. }
  19. //just some empty function to comply link
  20. void do_abort(void) {}
  21. void do_final(void) {}
  22. void set_server_type(void) {}
  23. //tmp tp avoid link issue in cmake
  24. #if defined(CMAKE)
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. void Sql_Init(void) {}
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif