testexecfw/symbianunittestfw/sutfw/sutfwcore/sutfwoutput/src/symbianunittestoutputashtml.cpp
changeset 1 bbd31066657e
parent 0 3e07fef1e154
equal deleted inserted replaced
0:3e07fef1e154 1:bbd31066657e
    17 
    17 
    18 #include "symbianunittestresult.h"
    18 #include "symbianunittestresult.h"
    19 #include "symbianunittestfailure.h"
    19 #include "symbianunittestfailure.h"
    20 #include "symbianunittestfileoutputwriter.h"
    20 #include "symbianunittestfileoutputwriter.h"
    21 #include "symbianunittestoutputashtml.h"
    21 #include "symbianunittestoutputashtml.h"
       
    22 #include <utf.h>
    22 
    23 
    23 // CONSTANTS
    24 // CONSTANTS
    24 _LIT8( KHtmlHeader, "<html><head><title>Unit test results</title></head>\n" );
    25 _LIT8( KHtmlHeader, "<html><head><title>Unit test results</title></head>\n" );
    25 _LIT8( KHtmlFooter, "</html>\n" );
    26 _LIT8( KHtmlFooter, "</html>\n" );
    26 _LIT8( KHtmlBodyStartTag, "<body bgcolor=\"#DDDDDD\" text=\"black\">\n" );
    27 _LIT8( KHtmlBodyStartTag, "<body bgcolor=\"#DDDDDD\" text=\"black\">\n" );
   106 //
   107 //
   107 void CSymbianUnitTestOutputAsHtml::PrintPassedTestsL( 
   108 void CSymbianUnitTestOutputAsHtml::PrintPassedTestsL( 
   108     CSymbianUnitTestResult& aResult ) 
   109     CSymbianUnitTestResult& aResult ) 
   109     {
   110     {
   110     iOutputWriter->WriteL( KHtmlPassedTests, aResult.PassedTestCount() );
   111     iOutputWriter->WriteL( KHtmlPassedTests, aResult.PassedTestCount() );
       
   112     iOutputWriter->WriteL( KHtmlTableStartTag );
       
   113     const CDesCArray& testCaseNames = aResult.TestCaseNames();
       
   114     for ( TInt i=0; i < testCaseNames.Count(); i++ )
       
   115         {
       
   116         HBufC8* testName = CnvUtfConverter::ConvertFromUnicodeToUtf8L( testCaseNames[i] );
       
   117         PrintTableRowL( KHtmlTestNameTitle, *testName );
       
   118         delete testName;
       
   119         }
       
   120     iOutputWriter->WriteL( KHtmlTableEndTag );
   111     }
   121     }
   112 
   122 
   113 // -----------------------------------------------------------------------------
   123 // -----------------------------------------------------------------------------
   114 // From CSymbianUnitTestOutputFormatter
   124 // From CSymbianUnitTestOutputFormatter
   115 // -----------------------------------------------------------------------------
   125 // -----------------------------------------------------------------------------