1: static char help[] = "Tests PetscStack.\n\n"; 3: #include <petscsys.h> 5: #if !defined(PETSCSTACKSIZE) 6: #define PETSCSTACKSIZE 64 7: #endif 9: PetscErrorCode correct() 10: { 11: return 0; 12: } 14: PetscErrorCode correctu() 15: { 17: return 0; 18: } 20: PetscErrorCode foo() 21: { 22: return 0; 23: } 25: PetscErrorCode bar() 26: { 27: return 0; 28: } 30: PetscErrorCode baru() 31: { 33: return 0; 34: } 36: int main(int argc, char **argv) 37: { 39: PetscInitialize(&argc, &argv, (char *)0, help); 40: for (PetscInt i = 0; i < PETSCSTACKSIZE + 1; i++) correct(); 41: for (PetscInt i = 0; i < PETSCSTACKSIZE + 1; i++) foo(); 42: for (PetscInt i = 0; i < PETSCSTACKSIZE + 1; i++) bar(); 43: for (PetscInt i = 0; i < PETSCSTACKSIZE + 1; i++) foo(); 44: for (PetscInt i = 0; i < PETSCSTACKSIZE + 1; i++) baru(); 45: for (PetscInt i = 0; i < PETSCSTACKSIZE + 1; i++) foo(); 46: PetscFinalize(); 47: return 0; 48: } 50: /*TEST 52: test: 53: TODO: Since this now errors out the test harness can chock on the output 55: TEST*/