test_ui.c 535 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * This is a test for ui in $package$
  3. */
  4. #include "si_test.h"
  5. #include "eruta.h"
  6. #include "image.h"
  7. #include "ui.h"
  8. #include <stdarg.h>
  9. int test_va(int last, ...) {
  10. int res = 0; double d = 0.0; char * str = NULL;
  11. va_list args;
  12. va_start(args, last);
  13. va_list_scan(args, "ifs", &res, &d, &str);
  14. va_end(args);
  15. printf("%d %f %s\n", res, d, str);
  16. return res;
  17. }
  18. TEST_FUNC(ui) {
  19. TEST_INTEQ(1375, test_va(0, 1375, 12.34, "Aha!"));
  20. TEST_DONE();
  21. }
  22. int main(void) {
  23. TEST_INIT();
  24. TEST_RUN(ui);
  25. TEST_REPORT();
  26. }