test_number.c 378 B

123456789101112131415161718192021222324252627
  1. /**
  2. * This is a test for number in si
  3. */
  4. #include "si_test.h"
  5. #include "si_number.h"
  6. TEST_FUNC(si_number) {
  7. double da = 10.0, db = 20.0, dm;
  8. int ia = 10, ib = 20, im;
  9. SI_MIN_T(double, da, db, dm);
  10. TEST_ASSERT(dm == da);
  11. SI_MIN_T(int, ia, ib, im);
  12. TEST_INTEQ(im, ia);
  13. TEST_DONE();
  14. }
  15. int main(void) {
  16. TEST_INIT();
  17. TEST_RUN(si_number);
  18. TEST_REPORT();
  19. }