diff --git a/src/tests/Makefile b/src/tests/Makefile deleted file mode 100644 index 7f058759c6..0000000000 --- a/src/tests/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -source = $(wildcard *.f90) -test_objects = $(source:.f90=.o) -executables = $(basename $(source)) - -objects = ../search.o ../constants.o ../error.o ../global.o -objects += ../mesh.o ../mesh_header.o ../particle_header.o - -#=============================================================================== -# Compiler Options -#=============================================================================== - -F90 = ifort -F90FLAGS = -I.. -g -traceback -LDFLAGS = - -#=============================================================================== -# Targets -#=============================================================================== - -all: $(executables) -$(executables): $(test_objects) - $(F90) $(LDFLAGS) $@.o $(objects) -o $@ -clean: - @rm -f *.o *.mod $(executables) -neat: - @rm -f *.o *.mod - -#=============================================================================== -# Rules -#=============================================================================== - -.SUFFIXES: .f90 .o -.PHONY: all clean neat - -%.o: %.f90 - $(F90) $(F90FLAGS) -c $< diff --git a/src/tests/test_binary_search.f90 b/src/tests/test_binary_search.f90 deleted file mode 100644 index d1e0b62a54..0000000000 --- a/src/tests/test_binary_search.f90 +++ /dev/null @@ -1,24 +0,0 @@ -program test_binary_search - - use search, only: binary_search - - implicit none - - integer :: i - integer :: index - integer, parameter :: n = 100 - real(8) :: array(n) - real(8) :: lbound - real(8) :: ubound - real(8) :: val - - array = (/ (log(real(i+2)), i = 1, n) /) - - val = 4.134 - index = binary_search(array, n, val) - - write(UNIT=*, FMT='(A,I2,A,ES11.4)') "array(", index, ") = ", array(index) - write(UNIT=*, FMT='(A,ES11.4)') "value = ", val - write(UNIT=*, FMT='(A,I2,A,ES11.4)') "array(", index + 1, ") = ", array(index + 1) - -end program test_binary_search diff --git a/src/tests/test_mesh.f90 b/src/tests/test_mesh.f90 deleted file mode 100644 index ffed41e39c..0000000000 --- a/src/tests/test_mesh.f90 +++ /dev/null @@ -1,67 +0,0 @@ -program test_mesh - - use mesh, only: mesh_indices_to_bin, bin_to_mesh_indices - use mesh_header, only: StructuredMesh - - implicit none - - integer :: i, j, k - integer :: x, y, z - integer :: ijk(3), ijk_new(3) - integer :: bin, bin_new - integer, parameter :: n = 3 - real(8) :: xyz(3) - logical :: passed - type(StructuredMesh), pointer :: m => null() - - x = 21 - y = 16 - z = 52 - - allocate(m) - m % n_dimension = n - allocate(m % dimension(n)) - m % dimension = (/ x, y, z /) - - passed = .true. - write(*,'(A)', ADVANCE='no') "Testing ijk --> bin:" - do i = 1, x - do j = 1, y - do k = 1, z - ijk = (/ i, j, k /) - bin = mesh_indices_to_bin(m, ijk) - call bin_to_mesh_indices(m, bin, ijk_new) - - ! Check to make sure new indices match old - if (any(ijk /= ijk_new)) passed = .false. - end do - end do - end do - call write_result(passed) - - passed = .true. - write(*,'(A)', ADVANCE='no') "Testing bin --> ijk:" - do bin = 1, product(m % dimension) - call bin_to_mesh_indices(m, bin, ijk) - bin_new = mesh_indices_to_bin(m, ijk) - - ! Check to make sure new bin matches old - if (bin_new /= bin) passed = .false. - end do - call write_result(passed) - -contains - - subroutine write_result(passed) - - logical, intent(in) :: passed - - if (passed) then - write (*,'(5X,A)') char(27) // '[32mPASSED' // char(27) // '[30m' - else - write (*,'(5X,A)') char(27) // '[31mFAILED' // char(27) // '[30m' - end if - - end subroutine write_result - -end program test_mesh