What is the procedure to test a program in FORTRAN?

What is the procedure to test a program in FORTRAN?



- The program is tested completely with its routines and subroutines individually according to the specifications given.

- The test suit is prepared to work with the combination of the inputs, outputs and possible execution paths of the program.

- Verbose mode is turned on to test the program and this mode allows a file to be written with all the results of the tests.

- When the value of the mode is 1 then the state of the test is known as DEBUG and at this stage the variable is passed to all the subroutine programs and then the value checking is being done to see the value as 1.

- Subsystem classification is being done where the DEBUG variable corresponds to another program and all the results are stored in the debug file.

- The program can be written like:

#ifdef DEBUG
IF (DEBUG .EQ. 1) WRITE(*,*) ' X= ', X
#endif
Post your comment