test.c 761 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. Copyright Kitware, Inc.
  3. Distributed under the OSI-approved BSD 3-Clause License.
  4. See accompanying file Copyright.txt for details.
  5. */
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. extern int test_abi_C(void);
  10. extern int test_int_C(void);
  11. extern int test_abi_CXX(void);
  12. extern int test_int_CXX(void);
  13. extern int test_include_C(void);
  14. extern int test_include_CXX(void);
  15. #ifdef __cplusplus
  16. } // extern "C"
  17. #endif
  18. int main(void)
  19. {
  20. int result = 1;
  21. #ifdef KWIML_LANGUAGE_C
  22. result = test_abi_C() && result;
  23. result = test_int_C() && result;
  24. result = test_include_C() && result;
  25. #endif
  26. #ifdef KWIML_LANGUAGE_CXX
  27. result = test_abi_CXX() && result;
  28. result = test_int_CXX() && result;
  29. result = test_include_CXX() && result;
  30. #endif
  31. return result? 0 : 1;
  32. }