utilitylibraries/libutils/tsrc/src/integration_test_scenario18.cpp
changeset 22 ddc455616bd6
parent 0 e4d67989cc36
child 44 97b0fb8a2cc2
child 45 4b03adbd26ca
equal deleted inserted replaced
18:47c74d1534e1 22:ddc455616bd6
    18 #include <stdio.h>
    18 #include <stdio.h>
    19 #include<e32std.h>
    19 #include<e32std.h>
    20 #include "libutils.h"
    20 #include "libutils.h"
    21 #include"std_log_result.h"
    21 #include"std_log_result.h"
    22 #define LOG_FILENAME_LINE __FILE__, __LINE__
    22 #define LOG_FILENAME_LINE __FILE__, __LINE__
    23 void main()
    23 int main()
    24 {
    24 {
    25     __UHEAP_MARK;
    25     __UHEAP_MARK;
    26     {
    26     {
    27     wchar_t* mycharstring = L"hellohello";
    27     wchar_t* mycharstring = L"hellohello";
    28     int retval[10];
    28     int retval[10];
    36     retval[3]= WstringToTbuf8(str,tbuf);
    36     retval[3]= WstringToTbuf8(str,tbuf);
    37 
    37 
    38     wchar_t* myfinalstring= new wchar_t[35];
    38     wchar_t* myfinalstring= new wchar_t[35];
    39     int size=35;
    39     int size=35;
    40     retval[4]= Tbuf8ToWchar(tbuf,myfinalstring,size);
    40     retval[4]= Tbuf8ToWchar(tbuf,myfinalstring,size);
       
    41     
       
    42     for(int i=1; i<=4; i++)
       
    43         {
       
    44         if (retval[i]!= 0)
       
    45                 printf("Conversion failed for retval\n",retval[i]);
       
    46         }
    41 
    47 
    42     if(!wcscmp(mycharstring,myfinalstring))
    48     if(!wcscmp(mycharstring,myfinalstring))
    43     {
    49     {
    44     printf("\nintegration_test_scenario18 case passed");
    50     printf("\nintegration_test_scenario18 case passed");
    45     }
    51     }
    51     buf.Close();
    57     buf.Close();
    52     delete[] myfinalstring;	
    58     delete[] myfinalstring;	
    53     }
    59     }
    54     __UHEAP_MARKEND;
    60     __UHEAP_MARKEND;
    55     testResultXml("integration_test_scenario18");
    61     testResultXml("integration_test_scenario18");
       
    62     return 0;
    56 }
    63 }