paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/test paratest.cpp,1.5,1.6


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/test paratest.cpp,1.5,1.6
Date: Mon, 29 Apr 2002 07:44:25 -0400

Update of /cvsroot/paragui/paragui/test
In directory subversions:/tmp/cvs-serv23212/test

Modified Files:
        paratest.cpp 
Log Message:
PG_MessageObject, PG_Application cleanups
added PG_FileList
added performance test to paratest



Index: paratest.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/paratest.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** paratest.cpp        27 Apr 2002 15:36:55 -0000      1.5
--- paratest.cpp        29 Apr 2002 11:44:22 -0000      1.6
***************
*** 25,28 ****
--- 25,30 ----
  #define RESY 600
  
+ bool bTestMode = false;
+ 
  void Splash() {
      PG_ThemeWidget splash(NULL, PG_Rect(100,100,600,400), true);
***************
*** 299,302 ****
--- 301,308 ----
                }
  
+               if(strcmp(argv[c], "-t") == 0) {
+                       bTestMode = true;
+               }
+               
                if(strcmp(argv[c], "-bpp") == 0) {
                        bpp = atoi(argv[++c]);
***************
*** 498,510 ****
                      tmp->GetName());
  
        
!       // PG_Notebook   pgn(0, PG_Rect(50, 320, 300, 150));
!       // pgn.AddPage("Test", 0x01);
!       // pgn.AddPage("Second", 0x02);
!       // pgn.Show();
!               
!       // Enter main loop 
!       app.Run();
  
!       return EXIT_SUCCESS;
  }
--- 504,523 ----
                      tmp->GetName());
  
+ 
+       if(!bTestMode) {
+           app.Run();
+           return EXIT_SUCCESS;
+       }
        
!       start_ticks = SDL_GetTicks();
!       int iter = 100;
!       
!       for(int i=0; i<iter; i++) {
!               PG_Widget::UpdateScreen();
!       }
! 
!       int ticks = SDL_GetTicks() - start_ticks;
!       PG_LogMSG("did %i iterations in %i ms", iter, ticks);
  
!       return EXIT_SUCCESS;    
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]