Commit ea91d55a authored by Luca's avatar Luca

tests

parent ac496efa
......@@ -8,7 +8,7 @@ PROGRAM eval
call parse_cmd_args()
res = GPL(cmplx([1.0,-0.618034,2.9]))
res = GPL(cmplx([1,2,3]))
print*, res
END PROGRAM eval
......@@ -16,20 +16,22 @@ PROGRAM TEST
logical :: tests_successful = .true.
integer :: i
! call do_MPL_tests()
! call do_GPL_tests()
! call do_shuffle_tests() ! put this somewhere else
call parse_cmd_args()
res = G_flat(cmplx((/2,1/)),cmplx(3))
res = GPL(cmplx([1,2,3,4]))
print*, res
call do_MPL_tests()
call do_GPL_tests()
! call do_shuffle_tests() ! put this somewhere else
! if(tests_successful) then
! print*, 'All tests passed. '
! else
! print*, 'Some tests failed. '
! stop 1
! end if
if(tests_successful) then
print*, 'All tests passed. '
else
print*, 'Some tests failed. '
stop 1
end if
CONTAINS
......@@ -94,17 +96,15 @@ CONTAINS
complex(kind=prec), parameter :: epsilon = 1E-14
print*, 'doing GPL tests...'
! ref = dcmplx(0.0819393734128676)
! call test_one_condensed((/ 1,1 /),cmplx((/ 1.3d0, 1.1d0 /)),cmplx(0.4),2,ref,'2.1')
ref = dcmplx(0.0819393734128676)
call test_one_condensed((/ 1,1 /),cmplx((/ 1.3d0, 1.1d0 /)),cmplx(0.4),2,ref,'2.1')
! ref = dcmplx(0.01592795952537145)
! call test_one_condensed((/ 3,2 /),cmplx((/ 1.3d0, 1.1d0 /)),cmplx(0.4),2,ref,'2.2')
ref = dcmplx(0.01592795952537145)
call test_one_condensed((/ 3,2 /),cmplx((/ 1.3d0, 1.1d0 /)),cmplx(0.4),2,ref,'2.2')
! ref = dcmplx(0.0020332632172573974)
! call test_one_condensed((/ 4 /),cmplx((/ 0 /)),cmplx(1.6),1,ref,'2.3')
ref = dcmplx(0.0020332632172573974)
call test_one_condensed((/ 4 /),cmplx((/ 0 /)),cmplx(1.6),1,ref,'2.3')
! ref = dcmplx(0.0020332632172573974)
! call test_one_flat(cmplx((/1.0,3.0/)),cmplx(2.0),ref,'2.5')
end subroutine do_GPL_tests
subroutine do_shuffle_tests()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment