iso646.c 444 B

123456789101112131415161718192021222324252627282930
  1. #if defined __STDC_VERSION__
  2. #include <iso646.h>
  3. #include "test.h"
  4. void test_iso646_h(void)
  5. {
  6. int i = 1;
  7. testing_header("iso646.h");
  8. test_true(i and 1);
  9. test_true(i and_eq 1);
  10. test_true(i bitand 1);
  11. test_true(i bitor 1);
  12. test_true(compl i);
  13. test_false(not i);
  14. test_true(i not_eq 0);
  15. test_true(0 or i);
  16. test_true(i or_eq 1);
  17. test_true(i xor 0);
  18. test_true(i xor_eq 0);
  19. testing_end();
  20. }
  21. #else
  22. void test_iso646_h(void)
  23. {
  24. }
  25. #endif