testexecfw/symbianunittestfw/sutfw/sutfwcore/sutfwoutput/src/symbianunittestfileoutputwriter.cpp
changeset 1 bbd31066657e
parent 0 3e07fef1e154
equal deleted inserted replaced
0:3e07fef1e154 1:bbd31066657e
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include "symbianunittestfileoutputwriter.h"
    18 #include "symbianunittestfileoutputwriter.h"
    19 #include "symbianunittestuicallback.h"
    19 #include "symbianunittestuicallback.h"
       
    20 #include <utf.h>
    20 
    21 
    21 _LIT( KResultDirectory, "\\sut\\" );
    22 _LIT( KResultDirectory, "\\sut\\" );
    22 _LIT8( KDateAndTimeFormat, "%02d.%02d.%04d @ %02d:%02d:%02d" );
    23 _LIT8( KDateAndTimeFormat, "%02d.%02d.%04d @ %02d:%02d:%02d" );
    23 
    24 
    24 // -----------------------------------------------------------------------------
    25 // -----------------------------------------------------------------------------
   111 
   112 
   112 // -----------------------------------------------------------------------------
   113 // -----------------------------------------------------------------------------
   113 //
   114 //
   114 // -----------------------------------------------------------------------------
   115 // -----------------------------------------------------------------------------
   115 //
   116 //
       
   117 void CSymbianUnitTestFileOutputWriter::WriteL( const TDesC& aValue )
       
   118     {
       
   119     HBufC8* value = CnvUtfConverter::ConvertFromUnicodeToUtf8L(aValue);
       
   120     CleanupStack::PushL(value);
       
   121     User::LeaveIfError( iFile.Write( *value ) );
       
   122     CleanupStack::PopAndDestroy( value );
       
   123     }
       
   124 
       
   125 // -----------------------------------------------------------------------------
       
   126 //
       
   127 // -----------------------------------------------------------------------------
       
   128 //
   116 void CSymbianUnitTestFileOutputWriter::WriteL( 
   129 void CSymbianUnitTestFileOutputWriter::WriteL( 
   117     const TDesC8& aFormat, 
   130     const TDesC8& aFormat, 
   118     TInt aValue )
   131     TInt aValue )
   119     {
   132     {
   120     const TInt KIntAsTextMaxLength( 20 );
   133     const TInt KIntAsTextMaxLength( 20 );