Lines Matching defs:tests
30 } tests[] = {
54 for (n = 0; n < sizeof(tests) / sizeof(tests[0]); ++n) {
58 if (tests[n].only_C_locale && strcmp(loc, "C") != 0)
61 if (swscanf(tests[n].arg, tests[n].fmt, buf) != tests[n].retval) {
62 printf("swscanf (\"%S\", \"%S\", ...) failed\n", tests[n].arg,
63 tests[n].fmt);
65 } else if (tests[n].retval != 0 && strcmp(buf, tests[n].res) != 0) {
68 tests[n].arg, tests[n].fmt, buf, tests[n].res);
71 printf("swscanf (\"%S\", \"%S\", ...) OK\n", tests[n].arg,
72 tests[n].fmt);
74 if (swscanf(tests[n].arg, tests[n].wfmt, wbuf) != tests[n].retval) {
75 printf("swscanf (\"%S\", \"%S\", ...) failed\n", tests[n].arg,
76 tests[n].wfmt);
78 } else if (tests[n].retval != 0 && wcscmp(wbuf, tests[n].wres) != 0) {
81 tests[n].arg, tests[n].wfmt, wbuf, tests[n].wres);
84 printf("swscanf (\"%S\", \"%S\", ...) OK\n", tests[n].arg,
85 tests[n].wfmt);