int main() { __UHEAP_MARK; { int retval =ESuccess; string str((const char*)""); _LIT(KTxt, ""); TBufC<30> tbuf(KTxt); TPtrC tptrc(tbuf); retval = Tptrc16ToString(tbuf,str); if (retval ==ESuccess) { printf("tptrc16tostring Passed"); } else { assert_failed = true; printf("tptrc16tostring failed"); } } __UHEAP_MARKEND; testResultXml("test_tptrc16tostring_negative1"); return 0; }
void CStdWindow::SetTitle(const char *Title) { #ifdef USE_X11 XTextProperty title_property; StdStrBuf tbuf(Title, true); char *tbufstr = tbuf.getMData(); XStringListToTextProperty(&tbufstr, 1, &title_property); XSetWMName(dpy, wnd, &title_property); #endif }
int main() { __UHEAP_MARK; { int retval =ESuccess; wstring str; _LIT8(KTxt, ""); TBufC8<30> tbuf(KTxt); retval = Tbufc8ToWstring(tbuf,str); if (retval ==EDescriptorNoData) { printf("tbufc8towstring Passed"); } else { assert_failed = true; printf("tbufc8towstring failed"); } } __UHEAP_MARKEND; testResultXml("test_tbufc8towstring_negative1"); }
int main() { __UHEAP_MARK; { int retval =ESuccess; string str((const char*)""); _LIT16(KTxt, "hellohellohellohellohellohellohehellohellohehelloh"); TBuf16<300> tbuf(KTxt); retval = Tbuf16ToString(tbuf,str); if (retval ==ESuccess) { printf("tbuf16tostring Passed"); } else { assert_failed = true; printf("tbuf16tostring failed"); } } __UHEAP_MARKEND; testResultXml("test_tbuf16tostring_boundary1"); return 0; }