uiacceltk/hitchcock/CommonInc/alfmoduletest.h
branchRCL_3
changeset 8 46927d61fef3
parent 7 88b23e2e82e1
child 12 f93c875b566e
equal deleted inserted replaced
7:88b23e2e82e1 8:46927d61fef3
     1 #ifndef ALFMODULETEST_H
     1 #ifndef ALFMODULETEST_H
     2 #define ALFMODULETEST_H
     2 #define ALFMODULETEST_H
     3 
     3 
     4 
     4 
     5 #include <e32base.h>
     5 #include <e32base.h>
       
     6 #include <graphics/surface.h>
     6 #include <e32debug.h>
     7 #include <e32debug.h>
     7 
     8 
     8 // Informs if module test hooks have been set on.
     9 // Informs if module test hooks have been set on.
     9 #include "alfmoduletestconf.h"
    10 #include "alfmoduletestconf.h"
    10 
    11 
    30  */
    31  */
    31 
    32 
    32 NONSHARABLE_CLASS(CAlfModuleTestData) : public CBase
    33 NONSHARABLE_CLASS(CAlfModuleTestData) : public CBase
    33     {
    34     {
    34 public:
    35 public:
    35     void PrintState()
    36     void PrintState() const
    36         {
    37         {
    37         RDebug::Print(_L("*** ALF INTERNAL STATE ***"));
    38         RDebug::Print(_L("*** ALF INTERNAL STATE ***"));
    38         RDebug::Print(_L("iTotalLayerCount[0]=%d"), iTotalLayerCount[0]);
    39         RDebug::Print(_L("iTotalLayerCount[0]=%d"), iTotalLayerCount[0]);
    39         RDebug::Print(_L("iTotalLayerCount[1]=%d"), iTotalLayerCount[1]);
    40         RDebug::Print(_L("iTotalLayerCount[1]=%d"), iTotalLayerCount[1]);
    40         RDebug::Print(_L("iCloneLayerCount=%d"), iCloneLayerCount);
    41         RDebug::Print(_L("iCloneLayerCount=%d"), iCloneLayerCount);
    80         PrintIntMapState( iIntMap );
    81         PrintIntMapState( iIntMap );
    81         RDebug::Print(_L("iSizeMap =>"));
    82         RDebug::Print(_L("iSizeMap =>"));
    82         PrintSizeMapState( iSizeMap );
    83         PrintSizeMapState( iSizeMap );
    83         RDebug::Print(_L("iPositionMap =>"));
    84         RDebug::Print(_L("iPositionMap =>"));
    84         PrintPositionMapState( iPositionMap );
    85         PrintPositionMapState( iPositionMap );
       
    86         RDebug::Print(_L("iSurfaceMap =>"));
       
    87         PrintSurfaceMapState( iSurfaceMap );        
    85         RDebug::Print(_L("*** ALF INTERNAL STATE ***"));
    88         RDebug::Print(_L("*** ALF INTERNAL STATE ***"));
    86         }
    89         }
    87 
    90 
    88 
    91 
    89     void PrintBoolMapState( TAlfModuleTestMap< TBool > aMap )
    92     void PrintBoolMapState( const TAlfModuleTestMap< TBool >& aMap ) const
    90         {
    93         {
    91         RDebug::Print(_L("*** ALF INTERNAL BOOL MAP STATE -->"));
    94         RDebug::Print(_L("*** ALF INTERNAL BOOL MAP STATE -->"));
    92         RDebug::Print(_L("Map item count=%d"), aMap.ItemCount());
    95         RDebug::Print(_L("Map item count=%d"), aMap.ItemCount());
    93         for ( TInt i = 0; i < aMap.ItemCount(); ++i )
    96         for ( TInt i = 0; i < aMap.ItemCount(); ++i )
    94             {
    97             {
    98             }
   101             }
    99         RDebug::Print(_L("<-- ALF INTERNAL BOOL MAP STATE ***"));
   102         RDebug::Print(_L("<-- ALF INTERNAL BOOL MAP STATE ***"));
   100         }
   103         }
   101     
   104     
   102     
   105     
   103     void PrintIntMapState( TAlfModuleTestMap< TInt > aMap )
   106     void PrintIntMapState( const TAlfModuleTestMap< TInt >& aMap ) const
   104         {
   107         {
   105         RDebug::Print(_L("*** ALF INTERNAL INT MAP STATE -->"));
   108         RDebug::Print(_L("*** ALF INTERNAL INT MAP STATE -->"));
   106         RDebug::Print(_L("Map item count=%d"), aMap.ItemCount());
   109         RDebug::Print(_L("Map item count=%d"), aMap.ItemCount());
   107         for ( TInt i = 0; i < aMap.ItemCount(); ++i )
   110         for ( TInt i = 0; i < aMap.ItemCount(); ++i )
   108             {
   111             {
   112             }
   115             }
   113         RDebug::Print(_L("<-- ALF INTERNAL INT MAP STATE ***"));
   116         RDebug::Print(_L("<-- ALF INTERNAL INT MAP STATE ***"));
   114         }
   117         }
   115     
   118     
   116     
   119     
   117     void PrintSizeMapState( TAlfModuleTestMap< TSize > aMap )
   120     void PrintSizeMapState( const TAlfModuleTestMap< TSize >& aMap ) const
   118         {
   121         {
   119         RDebug::Print(_L("*** ALF INTERNAL SIZE MAP STATE -->"));
   122         RDebug::Print(_L("*** ALF INTERNAL SIZE MAP STATE -->"));
   120         RDebug::Print(_L("Map item count=%d"), aMap.ItemCount());
   123         RDebug::Print(_L("Map item count=%d"), aMap.ItemCount());
   121         for ( TInt i = 0; i < aMap.ItemCount(); ++i )
   124         for ( TInt i = 0; i < aMap.ItemCount(); ++i )
   122             {
   125             {
   128             }
   131             }
   129         RDebug::Print(_L("<-- ALF INTERNAL SIZE MAP STATE ***"));
   132         RDebug::Print(_L("<-- ALF INTERNAL SIZE MAP STATE ***"));
   130         }
   133         }
   131 
   134 
   132     
   135     
   133     void PrintPositionMapState( TAlfModuleTestMap< TPoint > aMap )
   136     void PrintPositionMapState( const TAlfModuleTestMap< TPoint >& aMap ) const
   134         {
   137         {
   135         RDebug::Print(_L("*** ALF INTERNAL POSITION MAP STATE -->"));
   138         RDebug::Print(_L("*** ALF INTERNAL POSITION MAP STATE -->"));
   136         RDebug::Print(_L("Map item count=%d"), aMap.ItemCount() );
   139         RDebug::Print(_L("Map item count=%d"), aMap.ItemCount() );
   137         for ( TInt i = 0; i < aMap.ItemCount(); ++i )
   140         for ( TInt i = 0; i < aMap.ItemCount(); ++i )
   138             {
   141             {
   141                              i, item.Key(), item.TestType(), item.ValueSetCount(), item.LinkTargetKey());
   144                              i, item.Key(), item.TestType(), item.ValueSetCount(), item.LinkTargetKey());
   142             RDebug::Print(_L("Map item index=%d, x=%d, y=%d"),
   145             RDebug::Print(_L("Map item index=%d, x=%d, y=%d"),
   143                              i, item.Value().iX, item.Value().iY);
   146                              i, item.Value().iX, item.Value().iY);
   144             }
   147             }
   145         RDebug::Print(_L("<-- ALF INTERNAL POSITION MAP STATE ***"));
   148         RDebug::Print(_L("<-- ALF INTERNAL POSITION MAP STATE ***"));
   146         }    
   149         }
   147 
   150 
   148     
   151     
       
   152     void PrintSurfaceMapState( const TAlfModuleTestMap< TSurfaceId >& aMap ) const
       
   153         {
       
   154         RDebug::Print(_L("*** ALF INTERNAL SURFACE MAP STATE -->"));
       
   155         RDebug::Print(_L("Map item count=%d"), aMap.ItemCount() );
       
   156         for ( TInt i = 0; i < aMap.ItemCount(); ++i )
       
   157             {
       
   158             const TAlfModuleTestItem< TSurfaceId >& item( aMap.Item( i ) );
       
   159             RDebug::Print(_L("Map item %d, iKey=%d, iTestType=%d, iValueSetCount=%d, iLinkTargetKey=%d"),
       
   160                              i, item.Key(), item.TestType(), item.ValueSetCount(), item.LinkTargetKey());
       
   161             RDebug::Print(_L("Map item index=%d, internal0=%d, internal1=%d, internal2=%d, internal3=%d"),
       
   162                              i, item.Value().iInternal[ 0 ], item.Value().iInternal[ 1 ],
       
   163                              item.Value().iInternal[ 2 ], item.Value().iInternal[ 3 ] );
       
   164             }
       
   165         RDebug::Print(_L("<-- ALF INTERNAL SURFACE MAP STATE ***"));
       
   166         }
       
   167 
       
   168 
   149 public:
   169 public:
   150     TBool iIsEnabled;           // *** not yet implemented. For run-time enabling/disabling of the test system.  
   170     TBool iIsEnabled;           // *** not yet implemented. For run-time enabling/disabling of the test system.  
   151     
   171     
   152     // Alf Render Stage
   172     // Alf Render Stage
   153     TInt iScreenCount;          // *** not yet implemented
   173     TInt iScreenCount;          // *** not yet implemented
   202     TInt iASE_Temp1;
   222     TInt iASE_Temp1;
   203     TInt iASE_Temp2;
   223     TInt iASE_Temp2;
   204     TInt iASE_Temp3;
   224     TInt iASE_Temp3;
   205     TInt iASE_Temp4;
   225     TInt iASE_Temp4;
   206 
   226 
   207     // Map that contains boolean items that can be specified for certain test cases.
   227     // Map that contains boolean items for certain test cases.
   208     TAlfModuleTestMap< TBool > iBoolMap;        
   228     TAlfModuleTestMap< TBool > iBoolMap;        
   209     // Map that contains integer items that can be specified for certain test cases.
   229     // Map that contains integer items for certain test cases.
   210     TAlfModuleTestMap< TInt > iIntMap;    
   230     TAlfModuleTestMap< TInt > iIntMap;    
   211     // Map that contains size items that can be specified for certain test cases.
   231     // Map that contains size items for certain test cases.
   212     TAlfModuleTestMap< TSize > iSizeMap;
   232     TAlfModuleTestMap< TSize > iSizeMap;
   213     // Map that contains position items that can be specified for certain test cases.
   233     // Map that contains position items for certain test cases.
   214     TAlfModuleTestMap< TPoint > iPositionMap;    
   234     TAlfModuleTestMap< TPoint > iPositionMap;
   215 
   235     // Map that contains rect items for certain test cases.
       
   236     TAlfModuleTestMap< TRect > iRectMap;
       
   237     // Map that contains surface id items for layer/surface test cases.
       
   238     TAlfModuleTestMap< TSurfaceId > iSurfaceMap;
       
   239     
   216     };
   240     };
   217 
   241 
   218 
   242 
   219 /*
   243 /*
   220  *  Class CAlfModuleTestDataControl
   244  *  Class CAlfModuleTestDataControl