puts_tc.c 378 B

12345678910111213141516171819202122
  1. #include <stdio.h>
  2. static int puts_entry(void)
  3. {
  4. char data[] = "puts testcase\n";
  5. printf("puts testcase:");
  6. puts(data);
  7. return 0;
  8. }
  9. #include <utest.h>
  10. static void test_puts(void)
  11. {
  12. uassert_int_equal(puts_entry(), 0);
  13. }
  14. static void testcase(void)
  15. {
  16. UTEST_UNIT_RUN(test_puts);
  17. }
  18. UTEST_TC_EXPORT(testcase, "posix.stdio_h.puts.c", RT_NULL, RT_NULL, 10);