utilitylibraries/libutils/tsrc/src/integration_test_scenario21.cpp
branchRCL_3
changeset 57 2efc27d87e1c
parent 56 acd3cd4aaceb
equal deleted inserted replaced
56:acd3cd4aaceb 57:2efc27d87e1c
    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 int main()
    23 void main()
    24 {
    24 {
    25     __UHEAP_MARK;
    25     __UHEAP_MARK;
    26     {
    26     {
    27     int retval[10];
    27     int retval[10];
    28     wstring mystring(L"hellohello");
    28     wstring mystring(L"hellohello");
    37     HBufC16 *hbufc = HBufC16::NewMaxL(30);
    37     HBufC16 *hbufc = HBufC16::NewMaxL(30);
    38     retval[3] = WcharToHbufc16(myWchar,hbufc);
    38     retval[3] = WcharToHbufc16(myWchar,hbufc);
    39 
    39 
    40     wstring myFinalWstr(L"kjhskjfhsakhssjhfdkjshfdks") ;
    40     wstring myFinalWstr(L"kjhskjfhsakhssjhfdkjshfdks") ;
    41     retval[4] = Hbufc16ToWstring(hbufc,myFinalWstr);
    41     retval[4] = Hbufc16ToWstring(hbufc,myFinalWstr);
    42     
       
    43     for(int i=1; i<=4; i++)
       
    44         {
       
    45         if (retval[i]!= 0)
       
    46                 printf("Conversion failed for retval\n",retval[i]);
       
    47         }
       
    48 
    42 
    49     if(!wcscmp((wchar_t *)mystring.c_str(),(wchar_t *)myFinalWstr.c_str()))
    43     if(!wcscmp((wchar_t *)mystring.c_str(),(wchar_t *)myFinalWstr.c_str()))
    50     {
    44     {
    51     printf("\nintegration_test_scenario21 case passed");
    45     printf("\nintegration_test_scenario21 case passed");
    52     }
    46     }
    58     delete[] myWchar;
    52     delete[] myWchar;
    59     delete hbufc;
    53     delete hbufc;
    60     }
    54     }
    61     __UHEAP_MARKEND;
    55     __UHEAP_MARKEND;
    62     testResultXml("integration_test_scenario21");
    56     testResultXml("integration_test_scenario21");
    63     return 0;
       
    64 }
    57 }