[cig-commits] r4862 - in long/3D/Gale/trunk/src/StGermain: .
Base/Foundation/src
walter at geodynamics.org
walter at geodynamics.org
Wed Oct 11 13:47:41 PDT 2006
Author: walter
Date: 2006-10-11 13:47:40 -0700 (Wed, 11 Oct 2006)
New Revision: 4862
Modified:
long/3D/Gale/trunk/src/StGermain/
long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/TestSuite.c
long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/TestSuite.h
Log:
r2919 at earth: boo | 2006-10-11 13:42:43 -0700
r2835 at earth (orig r3823): LukeHodkinson | 2006-10-04 18:02:20 -0700
Changing the number of repetitions to be per test
as opposed to per test suite.
Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
- 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2918
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3822
+ 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2919
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3823
Modified: long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/TestSuite.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/TestSuite.c 2006-10-11 20:47:38 UTC (rev 4861)
+++ long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/TestSuite.c 2006-10-11 20:47:40 UTC (rev 4862)
@@ -80,7 +80,6 @@
self->nTests = 0;
self->tests = NULL;
self->watch = 0;
- self->nReps = 10;
}
@@ -161,14 +160,6 @@
}
}
-void TestSuite_SetNReps( void* testSuite, unsigned nReps ) {
- TestSuite* self = (TestSuite*)testSuite;
-
- assert( self );
-
- self->nReps = nReps;
-}
-
void TestSuite_SetProcToWatch( void* testSuite, unsigned watch ) {
TestSuite* self = (TestSuite*)testSuite;
@@ -209,7 +200,7 @@
if( rank == self->watch )
printf( " Running test '%s'... ", test->name );
- for( r_i = 0; r_i < self->nReps; r_i++ ) {
+ for( r_i = 0; r_i < test->nReps; r_i++ ) {
Bool result = test->func( rank, nProcs, self->watch );
if( rank == self->watch ) {
@@ -229,7 +220,7 @@
}
if( rank == self->watch )
- printf( "%s\n", (r_i == self->nReps) ? "passed" : "failed" );
+ printf( "%s\n", (r_i == test->nReps) ? "passed" : "failed" );
}
}
Modified: long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/TestSuite.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/TestSuite.h 2006-10-11 20:47:38 UTC (rev 4861)
+++ long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/TestSuite.h 2006-10-11 20:47:40 UTC (rev 4862)
@@ -56,6 +56,7 @@
typedef struct {
const char* name;
TestSuite_TestFunc* func;
+ unsigned nReps;
} TestSuite_Test;
#define __TestSuite \
@@ -67,8 +68,7 @@
/* TestSuite info */ \
unsigned nTests; \
TestSuite_Test* tests; \
- unsigned watch; \
- unsigned nReps;
+ unsigned watch;
struct TestSuite { __TestSuite };
@@ -104,7 +104,6 @@
*/
void TestSuite_SetTests( void* testSuite, unsigned nTests, TestSuite_Test* tests );
- void TestSuite_SetNReps( void* testSuite, unsigned nReps );
void TestSuite_SetProcToWatch( void* testSuite, unsigned watch );
void TestSuite_Run( void* testSuite );
More information about the cig-commits
mailing list