utilitylibraries/libutils/tsrc/src/test_rbuf8towstring_negative2.cpp
changeset 0 e4d67989cc36
child 22 ddc455616bd6
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #include <stdio.h>
       
    19 #include<e32std.h>
       
    20 #include<e32base.h>
       
    21 #include "libutils.h"
       
    22 #include"std_log_result.h"
       
    23 #define LOG_FILENAME_LINE __FILE__, __LINE__
       
    24 void main()
       
    25 {
       
    26     int retval =ESuccess;
       
    27     wstring des;
       
    28     __UHEAP_MARK;
       
    29     {
       
    30     RBuf8  buf;
       
    31     buf.Create(10);
       
    32     buf.Copy((TUint8 *)"Hello", 5);
       
    33     buf.CleanupClosePushL();
       
    34     int size =5;
       
    35     retval = Rbuf8ToWstring(buf, des  );
       
    36 
       
    37     if (retval == ESuccess)
       
    38     {
       
    39     printf("test rbuf8towstring negative2 Passed\n");
       
    40     }
       
    41     else
       
    42     {
       
    43     assert_failed = true;
       
    44     printf("test_rbuf8towstring negative2 Failed\n");
       
    45     }
       
    46     CleanupStack::PopAndDestroy(1);
       
    47     }
       
    48     __UHEAP_MARKEND;    
       
    49     testResultXml("test_rbuf8towstring_negative2");
       
    50 }