From: <laz...@us...> - 2004-02-29 18:15:25
|
Update of /cvsroot/rtk/rtk/test/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17958/test/core Modified Files: string0.cpp Log Message: More string stuff... uhh.. :) Index: string0.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/test/core/string0.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** string0.cpp 28 Feb 2004 07:39:44 -0000 1.11 --- string0.cpp 29 Feb 2004 17:57:10 -0000 1.12 *************** *** 9,12 **** --- 9,58 ---- #include "../test.h" + void rstrset_test() + { + rprintf(_R("rstrset_test()\n")); + + RCHAR source[] = { _R("A sample STRING") }; + + OUT("source = '%s'", source); + + STEP( rstrnset(source, '=', 5) ); + OUT("source = '%s'", source); + + STEP( rstrset(source, '*') ); + OUT("source = '%s'", source); + } + + void rstr_case_test() + { + rprintf(_R("rstr_case_test()\n")); + + RCHAR source[] = { _R("A miXED-CAse StrinG") }; + RCHAR source2[] = { _R("A miXED-CAse StrinG") }; + + OUT("source = '%s'", source); + STEP( rstrupr(source) ); + OUT("source = '%s'", source); + + OUT("source2 = '%s'", source2); + STEP( rstrlwr(source2) ); + OUT("source2 = '%s'", source2); + } + + void rstrrev_test() + { + rprintf(_R("rstrrev_test()\n")); + + RCHAR source[] = { _R("A sample STRING") }; + + OUT("source = '%s'", source); + + STEP( rstrrev(source) ); + OUT("source = '%s'", source); + + STEP( rstrrev(source) ); + OUT("source = '%s'", source); + } + String some_func(RCHAR * input) { *************** *** 112,121 **** //String sCyr = L"ÐоздÑав Ñвим ÑÑбиÑеÑима RTK-а\n"; //wprintf(sCyr.c_str()); ! #endif return 0; } - #if 0 // This is dummy function // Just to check declarations of functions at compile time --- 158,170 ---- //String sCyr = L"ÐоздÑав Ñвим ÑÑбиÑеÑима RTK-а\n"; //wprintf(sCyr.c_str()); ! #endif ! ! rstrset_test(); ! rstrrev_test(); ! rstr_case_test(); return 0; } // This is dummy function // Just to check declarations of functions at compile time *************** *** 134,142 **** // str <-> number conversions ! // ritoa(0,0,0); ! // rltoa(0,0,0); ! // rultoa(0,0,0); ! // ratoi(0); ! // ratol(0); rstrtod(0,0); rstrtol(0,0,0); --- 183,188 ---- // str <-> number conversions ! ratoi(0); ! ratol(0); rstrtod(0,0); rstrtol(0,0,0); *************** *** 152,166 **** // scanf's ! /*rfscanf(0,0,0); rsscanf(0,0); rscanf(0,0); - rvfscanf(0,0,0); - rvsscanf(0,0,0); - rvscanf(0,0);*/ // File ! // rfdopen(0,0); ! // rfopen(0,0); ! // rfreopen(0,0,0); // str --- 198,209 ---- // scanf's ! rfscanf(0,0,0); rsscanf(0,0); rscanf(0,0); // File ! rfdopen(0,0); ! rfopen(0,0); ! rfreopen(0,0,0); // str *************** *** 179,190 **** rstrncmp(0,0,0); rstrncpy(0,0,0); - // rstrnset(0,0,0); ??? rstrpbrk(_R(""),0); rstrrchr(_R(""),0); ! // rstrrev(0); ??? ! // rstrset(0,0); ??? rstrspn(0,0); rstrstr(_R(""), _R("")); ! // rstrtok(0,0); <- multi-thread safe version is needed!!! // is* --- 222,234 ---- rstrncmp(0,0,0); rstrncpy(0,0,0); rstrpbrk(_R(""),0); rstrrchr(_R(""),0); ! rstrrev(0); ! rstrset(0,0); ! rstrnset(0,0,0); rstrspn(0,0); rstrstr(_R(""), _R("")); ! rstrtok(0,0); ! rstrtok_r(0,0); // is* *************** *** 202,209 **** rtolower(0); rtoupper(0); ! //rstrlwr(0); ! //rstrupr(0); } - #endif /** --- 246,252 ---- rtolower(0); rtoupper(0); ! rstrlwr(0); ! rstrupr(0); } /** |