traceservices/tracefw/ulogger/unit_test/te-outfrwkchans/te-serial/uloggerserialplugintest.cpp
branchRCL_3
changeset 23 26645d81f48d
parent 0 08ec8eefde2f
child 24 cc28652e0254
equal deleted inserted replaced
21:28839de615b4 23:26645d81f48d
    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::TestUnlockResources()
    50 void CSerial0Step::TestUnlockResourcesL()
    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::TestSettings()
    69 void CSerial0Step::TestSettingsL()
    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::TestWrite()
    95 void CSerial0Step::TestWriteL()
    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 		TestUnlockResources();
   151 		TestUnlockResourcesL();
   152 		TestSettings();
   152 		TestSettingsL();
   153 		TestWrite();
   153 		TestWriteL();
   154 		
   154 		
   155 		if(iErrors == 0)
   155 		if(iErrors == 0)
   156 			SetTestStepResult(EPass);
   156 			SetTestStepResult(EPass);
   157 		else
   157 		else
   158 			{
   158 			{