summaryrefslogtreecommitdiff
path: root/test/locale-mbwc/dat_isw-funcs.h
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-10 10:30:28 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-07-10 10:30:28 +0000
commitbb9231c8402e9ae99f98a868429e73c6340da304 (patch)
treed7ed637099fba4ab6db1cc4c009cad8485dcdb66 /test/locale-mbwc/dat_isw-funcs.h
parenta691312d8794d5516402bb6bb0d3e90c40ba188b (diff)
Added missing tests for locale with multibyte encoding
Diffstat (limited to 'test/locale-mbwc/dat_isw-funcs.h')
-rw-r--r--test/locale-mbwc/dat_isw-funcs.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/locale-mbwc/dat_isw-funcs.h b/test/locale-mbwc/dat_isw-funcs.h
new file mode 100644
index 000000000..70aecb083
--- /dev/null
+++ b/test/locale-mbwc/dat_isw-funcs.h
@@ -0,0 +1,37 @@
+/*
+ * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ * FILE: dat_isw-funcs.h
+ *
+ * ISW*: int isw* (wint_t wc);
+ */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <wctype.h>
+#include "tst_types.h"
+#include "tgn_locdef.h"
+
+#define TST_ISW_LOC(FUNC, func) \
+ TST_ISW## FUNC tst_isw## func ##_loc []
+
+#define TST_ISW_REC(locale, func) \
+ { Tisw## func, TST_LOC_## locale },
+
+/*
+ * NOTE:
+ * Set ret_flg = 1, when a return value is expected to be 0 (FALSE).
+ * Set ret_flg = 0, when a return value is expected to be non-zero (TRUE).
+ *
+ * Since the functions return *non*-zero value for TRUE, can't
+ * compare an actual return value with an expected return value.
+ * Set the ret_flg=0 for TRUE cases and the tst_isw*() will check
+ * the non-zero value.
+ *
+ * { { WEOF }, { 0,1,0 } },
+ * | |
+ * | ret_val: an expected return value
+ * ret_flg: if 1, compare an actual return value with the
+ * ret_val; if 0, the test program
+ * checks the actual return value.
+ */