// S : tags libc c // S : expect --result valid // S : cc -o test.bc -D_PDCLIB_BUILD -DTEST $file // S : verify -o nofail:malloc test.bc #include #include "_PDCLIB_test.h" int main( void ) { TESTCASE(towctrans(L'a', wctrans("toupper")) == L'A'); TESTCASE(towctrans(L'B', wctrans("toupper")) == L'B'); TESTCASE(towctrans(L'a', wctrans("tolower")) == L'a'); TESTCASE(towctrans(L'B', wctrans("tolower")) == L'b'); TESTCASE(towctrans(L'B', wctrans("invalid")) == L'B'); TESTCASE(towctrans(L'B', 0) == L'B'); return TEST_RESULTS; }