tst_wcscmp.c 677 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. WCSCMP: int wcscmp (const wchar_t *ws1, const wchar_t *ws2);
  3. */
  4. #define TST_FUNCTION wcscmp
  5. #include "tsp_common.c"
  6. #include "dat_wcscmp.c"
  7. int
  8. tst_wcscmp (FILE * fp, int debug_flg)
  9. {
  10. TST_DECL_VARS (int);
  11. wchar_t *ws1, *ws2;
  12. TST_DO_TEST (wcscmp)
  13. {
  14. TST_HEAD_LOCALE (wcscmp, S_WCSCMP);
  15. TST_DO_REC (wcscmp)
  16. {
  17. TST_GET_ERRET (wcscmp);
  18. ws1 = TST_INPUT (wcscmp).ws1;
  19. ws2 = TST_INPUT (wcscmp).ws2;
  20. ret = wcscmp (ws1, ws2);
  21. ret = (ret > 0 ? 1 : ret < 0 ? -1 : 0);
  22. if (debug_flg)
  23. {
  24. fprintf (stderr, "tst_wcscmp: ret = %d\n", ret);
  25. }
  26. TST_IF_RETURN (S_WCSCMP)
  27. {
  28. };
  29. }
  30. }
  31. return err_count;
  32. }