Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
#filename: build_run_and_clean.sh
#create mod directory if not exists
mkdir -p mod

#compile source files
# -J specifies where .mod files will be generated, and add this path in compiler search location
gfortran -c ./src/*.f90 -J ./mod
gfortran -c ./fruit/*.f90 -J ./mod
gfortran -c ./test/*.f90 -J ./mod

# create executable file
gfortran -o fruit_driver *.o

#run tests
./fruit_driver

#clean
find . -name "*.o" -type f -delete
find . -name "*.mod" -type f -delete

Example output

 Output created with project described above

Output created with different project

NOTE: Fruits prints "." for every assert passed and "F" for every assert failed, not for every procedure call.

Image Added