os/ossrv/genericopenlibs/posixrealtimeextensions/test/testsharedmemory/src/tsharedmemory.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Name        : tsharedmemory.cpp
    15 // 
    16 //
    17 
    18 #include "tsharedmemory.h"
    19 #include <unistd.h> 
    20 #include <errno.h>
    21 #include <stdio.h>
    22 #include <e32std.h>
    23 #include <stdlib.h>
    24 #include <string.h>
    25 
    26 
    27 CTestsharedmemory::~CTestsharedmemory() 
    28 	{ 
    29 	}  
    30 
    31 CTestsharedmemory::CTestsharedmemory(const TDesC& aStepName)
    32 	{
    33 	// MANDATORY Call to base class method to set up the human readable name for logging.
    34 	SetTestStepName(aStepName);		
    35 	}
    36 
    37 TVerdict CTestsharedmemory::doTestStepPreambleL()
    38 	{
    39 	__UHEAP_MARK;	
    40 	SetTestStepResult(EPass);
    41 	return TestStepResult();
    42 	}
    43 
    44 
    45 
    46 TVerdict CTestsharedmemory::doTestStepPostambleL()
    47 	{
    48 	__UHEAP_MARKEND;	
    49 	iParamCnt=0;
    50 	return TestStepResult();
    51 	}
    52 
    53 
    54 TVerdict CTestsharedmemory::doTestStepL()
    55 	{
    56 	int err;
    57 	if(TestStepName() == KTestsharedmemory1)
    58    		{
    59    	   	INFO_PRINTF1(_L("Testsharedmemory1():"));
    60    	   	err = Testsharedmemory1();
    61    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    62    	   	}   	
    63 	if(TestStepName() == KTestsharedmemory2)
    64    		{
    65    	   	INFO_PRINTF1(_L("Testsharedmemory2():"));
    66    	   	err = Testsharedmemory2();
    67    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    68    	   	}     	
    69 	if(TestStepName() == KTestsharedmemory3)
    70    		{
    71    	   	INFO_PRINTF1(_L("Testsharedmemory3():"));
    72    	   	err = Testsharedmemory3();
    73    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    74    	   	}     	
    75 	if(TestStepName() == KTestsharedmemory4)
    76    		{
    77    	   	INFO_PRINTF1(_L("Testsharedmemory4():"));
    78    	   	err = Testsharedmemory4();
    79    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    80    	   	}      	
    81 	if(TestStepName() == KTestsharedmemory5)
    82    		{
    83    	   	INFO_PRINTF1(_L("Testsharedmemory5():"));
    84    	   	err = Testsharedmemory5();
    85    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    86    	   	}      	
    87 	if(TestStepName() == KTestsharedmemory6)
    88    		{
    89    	   	INFO_PRINTF1(_L("Testsharedmemory6():"));
    90    	   	err = Testsharedmemory6();
    91    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    92    	   	}      	
    93 	if(TestStepName() == KTestsharedmemory7)
    94    		{
    95    	   	INFO_PRINTF1(_L("Testsharedmemory7():"));
    96    	   	err = Testsharedmemory7();
    97    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    98    	   	}      	
    99 	if(TestStepName() == KTestsharedmemory8)
   100    		{
   101    	   	INFO_PRINTF1(_L("Testsharedmemory8():"));
   102    	   	err = Testsharedmemory8();
   103    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   104    	   	}      	
   105 	if(TestStepName() == KTestsharedmemory9)
   106    		{
   107    	   	INFO_PRINTF1(_L("Testsharedmemory9():"));
   108    	   	err = Testsharedmemory9();
   109    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   110    	   	}      	
   111 	if(TestStepName() == KTestsharedmemory10)
   112    		{
   113    	   	INFO_PRINTF1(_L("Testsharedmemory10():"));
   114    	   	err = Testsharedmemory10();
   115    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   116    	   	}       	
   117 	if(TestStepName() == KTestsharedmemory11)
   118    		{
   119    	   	INFO_PRINTF1(_L("Testsharedmemory11():"));
   120    	   	err = Testsharedmemory11();
   121    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   122    	   	}       	
   123 	if(TestStepName() == KTestsharedmemory12)
   124    		{
   125    	   	INFO_PRINTF1(_L("Testsharedmemory12():"));
   126    	   	err = Testsharedmemory12();
   127    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   128    	   	}       	
   129 	if(TestStepName() == KTestsharedmemory13)
   130    		{
   131    	   	INFO_PRINTF1(_L("Testsharedmemory13():"));
   132    	   	err = Testsharedmemory13();
   133    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   134    	   	}        	
   135 	if(TestStepName() == KTestsharedmemory14)
   136    		{
   137    	   	INFO_PRINTF1(_L("Testsharedmemory14():"));
   138    	   	err = Testsharedmemory14();
   139    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   140    	   	}        	
   141 	if(TestStepName() == KTestsharedmemory15)
   142    		{
   143    	   	INFO_PRINTF1(_L("Testsharedmemory15():"));
   144    	   	err = Testsharedmemory15();
   145    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   146    	   	}         	
   147 	if(TestStepName() == KTestsharedmemory16)
   148    		{
   149    	   	INFO_PRINTF1(_L("Testsharedmemory16():"));
   150    	   	err = Testsharedmemory16();
   151    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   152    	   	}          	
   153 	if(TestStepName() == KTestsharedmemory17)
   154    		{
   155    	   	INFO_PRINTF1(_L("Testsharedmemory17():"));
   156    	   	err = Testsharedmemory17();
   157    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   158    	   	}         	
   159 	if(TestStepName() == KTestsharedmemory18)
   160    		{
   161    	   	INFO_PRINTF1(_L("Testsharedmemory18():"));
   162    	   	err = Testsharedmemory18();
   163    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   164    	   	}         	
   165 	if(TestStepName() == KTestsharedmemory19)
   166    		{
   167    	   	INFO_PRINTF1(_L("Testsharedmemory19():"));
   168    	   	err = Testsharedmemory19();
   169    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   170    	   	}        	
   171 	if(TestStepName() == KTestsharedmemory20)
   172    		{
   173    	   	INFO_PRINTF1(_L("Testsharedmemory20():"));
   174    	   	err = Testsharedmemory20();
   175    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   176    	   	}        	
   177 	if(TestStepName() == KTestsharedmemory21)
   178    		{
   179    	   	INFO_PRINTF1(_L("Testsharedmemory21():"));
   180    	   	err = Testsharedmemory21();
   181    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   182    	   	}       	
   183 	if(TestStepName() == KTestsharedmemory22)
   184    		{
   185    	   	INFO_PRINTF1(_L("Testsharedmemory22():"));
   186    	   	err = Testsharedmemory22();
   187    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   188    	   	}        	
   189 	if(TestStepName() == KTestsharedmemory23)
   190    		{
   191    	   	INFO_PRINTF1(_L("Testsharedmemory23():"));
   192    	   	err = Testsharedmemory23();
   193    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   194    	   	}       	
   195 	if(TestStepName() == KTestsharedmemory24)
   196    		{
   197    	   	INFO_PRINTF1(_L("Testsharedmemory24():"));
   198    	   	err = Testsharedmemory24();
   199    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   200    	   	}        	
   201 	if(TestStepName() == KTestsharedmemory25)
   202    		{
   203    	   	INFO_PRINTF1(_L("Testsharedmemory25():"));
   204    	   	err = Testsharedmemory25();
   205    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   206    	   	}       	
   207 	if(TestStepName() == KTestsharedmemory26)
   208    		{
   209    	   	INFO_PRINTF1(_L("Testsharedmemory26():"));
   210    	   	err = Testsharedmemory26();
   211    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   212    	   	}
   213    	if(TestStepName() == KTestsharedmemory27)
   214    		{
   215    	   	INFO_PRINTF1(_L("Testsharedmemory27():"));
   216    	   	err = Testsharedmemory27();
   217    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   218    	   	}
   219    	if(TestStepName() == KTestsharedmemory28)
   220    		{
   221    	   	INFO_PRINTF1(_L("Testsharedmemory28():"));
   222    	   	err = Testsharedmemory28();
   223    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   224    	   	}
   225    	if(TestStepName() == KTestsharedmemory29)
   226    		{
   227    	   	INFO_PRINTF1(_L("Testsharedmemory29():"));
   228    	   	err = Testsharedmemory29();
   229    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   230    	   	}
   231    	if(TestStepName() == KTestsharedmemory30)
   232    		{
   233    	   	INFO_PRINTF1(_L("Testsharedmemory30():"));
   234    	   	err = Testsharedmemory30();
   235    	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   236    	   	}
   237 	return TestStepResult();
   238 
   239 	}
   240  
   241