You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4KB

  1. #pragma once
  2. #include <stdint.h>
  3. extern uint8_t spec;
  4. extern uint16_t test_passed;
  5. extern uint16_t test_failed;
  6. void _test_fail (const char *, const char *, uint16_t);
  7. void _test_pass (const char *);
  8. void _test_start (const char *);
  9. /* Successfull end of the test case */
  10. #define done() return 0
  11. /* Check single condition */
  12. #define check(cond, message) do { if (!(cond)) { _test_fail(message, __FILE__, __LINE__); test_failed++; } else { _test_pass(message); test_passed++; } } while (0)
  13. /* Test runner */
  14. #define test(func, name) do { _test_start(name); func(); } while(0)
  15. uint8_t test_trigger_update ( );
  16. uint8_t test_trigger_reset ( );
  17. uint8_t test_clock_exception ( );
  18. uint8_t test_clock_update ( );
  19. uint8_t test_clock_reset ( );
  20. uint8_t test_primeclock_exception ( );
  21. uint8_t test_primeclock_primes ( );
  22. uint8_t test_primeclock_update ( );
  23. uint8_t test_bjorklund_exception ( );
  24. uint8_t test_bjorklund_update_exception ( );
  25. uint8_t test_bjorklund_update ( );
  26. uint8_t test_bjorklund_reset ( );
  27. uint8_t test_distributedclock_master ( );
  28. uint8_t test_distributedclock_servant ( );
  29. uint8_t test_fibonacciclock_exception ( );
  30. uint8_t test_fibonacciclock_fibonaccis ( );
  31. uint8_t test_fibonacciclock_update ( );
  32. uint8_t test_event_emitter ( );
  33. uint8_t test_event_emitter_on ( );
  34. uint8_t test_event_emitter_clear ( );
  35. uint8_t test_event_emitter_listener ( );
  36. uint8_t test_cv_event ( );
  37. uint8_t test_cv_event_update ( );
  38. uint8_t test_cv_event_resets ( );