traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/uloggerserialplugintest.cpp
branchRCL_3
changeset 24 cc28652e0254
parent 23 26645d81f48d
equal deleted inserted replaced
23:26645d81f48d 24:cc28652e0254
    45  * Prerequisites:
    45  * Prerequisites:
    46  *
    46  *
    47  * Description: Retrieve and print some data from an external ini data file
    47  * Description: Retrieve and print some data from an external ini data file
    48  *
    48  *
    49  */
    49  */
    50 void CSerial0Step::TestUnlockResourcesL()
    50 void CSerial0Step::TestUnlockResources()
    51 	{
    51 	{
    52 	Ulogger::CSerialWriter* serialWriter = Ulogger::CSerialWriter::NewL();
    52 	Ulogger::CSerialWriter* serialWriter = Ulogger::CSerialWriter::NewL();
    53 	INFO_PRINTF1(_L("Invoking CSerialWriter::CloseOutputPlugin(). CloseOutputPlugin() is supposed to do nothing."));
    53 	INFO_PRINTF1(_L("Invoking CSerialWriter::CloseOutputPlugin(). CloseOutputPlugin() is supposed to do nothing."));
    54 	serialWriter->CloseOutputPlugin();
    54 	serialWriter->CloseOutputPlugin();
    55 	ASSERT_TRUE(ETrue);
    55 	ASSERT_TRUE(ETrue);
    64  * Prerequisites:
    64  * Prerequisites:
    65  *
    65  *
    66  * Description: Retrieve and print some data from an external ini data file
    66  * Description: Retrieve and print some data from an external ini data file
    67  *
    67  *
    68  */
    68  */
    69 void CSerial0Step::TestSettingsL()
    69 void CSerial0Step::TestSettings()
    70 	{
    70 	{
    71 	Ulogger::CSerialWriter* serialWriter = Ulogger::CSerialWriter::NewL();
    71 	Ulogger::CSerialWriter* serialWriter = Ulogger::CSerialWriter::NewL();
    72 	INFO_PRINTF1(_L("Passing empty RPointerArray to CSerialWriter::ConfigureOutputPlugin()"));
    72 	INFO_PRINTF1(_L("Passing empty RPointerArray to CSerialWriter::ConfigureOutputPlugin()"));
    73 	RPointerArray<TPluginConfiguration> emptyPointerArray;
    73 	RPointerArray<TPluginConfiguration> emptyPointerArray;
    74 	serialWriter->ConfigureOutputPlugin(emptyPointerArray);
    74 	serialWriter->ConfigureOutputPlugin(emptyPointerArray);
    90  * Description: Invoke CSerialWriter::Write() and check that test string is
    90  * Description: Invoke CSerialWriter::Write() and check that test string is
    91  *              written to KLogDefaultSerialName correctly.
    91  *              written to KLogDefaultSerialName correctly.
    92  *
    92  *
    93  */
    93  */
    94 // The implementation for this is not working correctly! Check this
    94 // The implementation for this is not working correctly! Check this
    95 void CSerial0Step::TestWriteL()
    95 void CSerial0Step::TestWrite()
    96 	{
    96 	{
    97 	INFO_PRINTF1(_L("Checking that CSerialWriter::Write(const TDesC8&) writes a string correctly to the serial port"));
    97 	INFO_PRINTF1(_L("Checking that CSerialWriter::Write(const TDesC8&) writes a string correctly to the serial port"));
    98 
    98 
    99 	// Create new CSerialWriter instance and write a test string to it
    99 	// Create new CSerialWriter instance and write a test string to it
   100 	Ulogger::CSerialWriter* serialWriter = Ulogger::CSerialWriter::NewL();
   100 	Ulogger::CSerialWriter* serialWriter = Ulogger::CSerialWriter::NewL();
   146  */
   146  */
   147 	{	
   147 	{	
   148 	  if (TestStepResult()==EPass)
   148 	  if (TestStepResult()==EPass)
   149 		{
   149 		{
   150 		TestNewL();
   150 		TestNewL();
   151 		TestUnlockResourcesL();
   151 		TestUnlockResources();
   152 		TestSettingsL();
   152 		TestSettings();
   153 		TestWriteL();
   153 		TestWrite();
   154 		
   154 		
   155 		if(iErrors == 0)
   155 		if(iErrors == 0)
   156 			SetTestStepResult(EPass);
   156 			SetTestStepResult(EPass);
   157 		else
   157 		else
   158 			{
   158 			{