printf_tc.c 388 B

12345678910111213141516171819
  1. #include <stdio.h>
  2. static int printf_entry(void)
  3. {
  4. printf("printf test:%s-%d-%c %f 0x%x","2021" ,8 ,'1' ,3.14 ,0xff);
  5. return 0;
  6. }
  7. #include <utest.h>
  8. static void test_printf(void)
  9. {
  10. uassert_int_equal(printf_entry(), 0);
  11. }
  12. static void testcase(void)
  13. {
  14. UTEST_UNIT_RUN(test_printf);
  15. }
  16. UTEST_TC_EXPORT(testcase, "rtt_posix_testcase.stdio_h."__FILE__, RT_NULL, RT_NULL, 10);