summaryrefslogtreecommitdiff
path: root/test/locale-mbwc/tst_wcsxfrm.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:29:21 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:31:55 +0200
commit99ef2719fb3d703fe38c4113cd7f5adec516dd3a (patch)
tree2c1f77cb41b60ccbf8faa77a3640491a3546b546 /test/locale-mbwc/tst_wcsxfrm.c
parent543308f6c46cf2edf8a524bc9c631e472570fe72 (diff)
test: remove test suite
The test suite is now a developed in a separate git repository. See here: http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git The test suite should be just like every other software compiled with the cross-toolchain. In the past strange problems where found when the test suite got build in the toolchain creation step.
Diffstat (limited to 'test/locale-mbwc/tst_wcsxfrm.c')
-rw-r--r--test/locale-mbwc/tst_wcsxfrm.c122
1 files changed, 0 insertions, 122 deletions
diff --git a/test/locale-mbwc/tst_wcsxfrm.c b/test/locale-mbwc/tst_wcsxfrm.c
deleted file mode 100644
index 6fb8a1c28..000000000
--- a/test/locale-mbwc/tst_wcsxfrm.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- WCSXFRM: size_t wcsxfrm (wchar_t *ws1, const wchar_t *ws2, size_t n);
-*/
-
-#define TST_FUNCTION wcsxfrm
-
-#include "tsp_common.c"
-#include "dat_wcsxfrm.c"
-
-int
-tst_wcsxfrm (FILE * fp, int debug_flg)
-{
- TST_DECL_VARS (size_t);
- wchar_t *org1, *org2;
- wchar_t frm1[MBSSIZE], frm2[MBSSIZE];
- size_t n1, n2;
- int ret_coll, ret_cmp;
-
- TST_DO_TEST (wcsxfrm)
- {
- TST_HEAD_LOCALE (wcsxfrm, S_WCSXFRM);
- TST_DO_REC (wcsxfrm)
- {
- TST_GET_ERRET (wcsxfrm);
- org1 = TST_INPUT (wcsxfrm).org1;
- org2 = TST_INPUT (wcsxfrm).org2;
- n1 = TST_INPUT (wcsxfrm).n1;
- n2 = TST_INPUT (wcsxfrm).n2;
- if (n1 < 0 || sizeof (frm1) < n1 || sizeof (frm2) < n2)
- {
- warn_count++;
- Result (C_IGNORED, S_WCSXFRM, CASE_9,
- "input data n1 or n2 is invalid");
- continue;
- }
-
- /* an errno and a return value are checked
- only for 2nd wcsxfrm() call.
- A result of 1st call is used to compare
- those 2 values by using wcscmp().
- */
-
- TST_CLEAR_ERRNO;
- ret = wcsxfrm (frm1, org1, n1); /* First call */
- TST_SAVE_ERRNO;
-
- if (debug_flg)
- {
- fprintf (stdout, "tst_wcsxfrm() : REC = %d\n", rec + 1);
- fprintf (stdout, "tst_wcsxfrm() : 1st ret = %zu\n", ret);
- }
-
- if (ret == -1 || ret >= n1 || errno_save != 0)
- {
- warn_count++;
- Result (C_INVALID, S_WCSXFRM, CASE_8,
- "got an error in fist wcsxfrm() call");
- continue;
- }
-
- TST_CLEAR_ERRNO;
- /* Second call */
- ret = wcsxfrm (((n2 == 0) ? NULL : frm2), org2, n2);
- TST_SAVE_ERRNO;
-
- TST_IF_RETURN (S_WCSXFRM)
- {
- };
-
- if (n2 == 0 || ret >= n2 || errno != 0)
- {
-#if 0
- warn_count++;
- Result (C_IGNORED, S_WCSXFRM, CASE_7, "did not get a result");
-#endif
- continue;
- }
-
- if (debug_flg)
- {
- fprintf (stdout, "tst_wcsxfrm() : 2nd ret = %zu\n", ret);
- }
-
- /* wcscoll() */
- TST_CLEAR_ERRNO;
- /* depends on wcscoll() ... not good though ... */
- ret_coll = wcscoll (org1, org2);
- TST_SAVE_ERRNO;
-
- if (errno != 0) /* bugs * bugs may got correct results ... */
- {
- warn_count++;
- Result (C_INVALID, S_WCSXFRM, CASE_6,
- "got an error in wcscoll() call");
- continue;
- }
- /* wcscmp() */
- ret_cmp = wcscmp (frm1, frm2);
-
- if ((ret_coll == ret_cmp) || (ret_coll > 0 && ret_cmp > 0)
- || (ret_coll < 0 && ret_cmp < 0))
- {
- Result (C_SUCCESS, S_WCSXFRM, CASE_3,
- MS_PASSED " (depends on wcscoll & wcscmp)");
- }
- else
- {
- err_count++;
- Result (C_FAILURE, S_WCSXFRM, CASE_3,
- "results from wcscoll & wcscmp() do not match");
- }
-
- if (debug_flg)
- {
- fprintf (stdout, "tst_wcsxfrm() : coll = %d <-> %d = cmp\n",
- ret_coll, ret_cmp);
- }
- }
- }
-
- return err_count;
-}