Skip to content

Commit

Permalink
More on the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasbock committed Jul 26, 2017
1 parent 7ee60f4 commit a33a824
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
34 changes: 28 additions & 6 deletions tests/bml_test.F90
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
function print_usage()
program bml_test

print *, "Usage"
use bml_types_m

end function print_usage
integer :: N = 11
integer :: M = -1
character(1000) :: test = ""
character(1000) :: matrix_type = BML_MATRIX_DENSE
character(1000) :: matrix_precision = BML_ELEMENT_REAL

program bml_test
integer :: n_args

! Arguments are interpreted as
!
! testname
! matrix_type
! precision

n_args = command_argument_count()
if(n_args /= 3) then
print *, "incorrect number of command line arguments"
error stop
end if

use bml_init_m
call get_command_argument(1, test)
call get_command_argument(2, matrix_type)
call get_command_argument(3, matrix_precision)

call bml_initF()
select case(test)
case default
print *, "unknown test name "//trim(test)
error stop
end select

end program bml_test
1 change: 1 addition & 0 deletions tests/test_m.F90
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module test_m

! All tests need the Fortran kinds corresponding to the C floating types.
use, intrinsic :: iso_c_binding, only : C_FLOAT, C_DOUBLE, C_FLOAT_COMPLEX, &
& C_DOUBLE_COMPLEX
Expand Down

0 comments on commit a33a824

Please # to comment.