diff --git a/tests/bml_test.F90 b/tests/bml_test.F90 index 086d37994..522696b3c 100644 --- a/tests/bml_test.F90 +++ b/tests/bml_test.F90 @@ -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 diff --git a/tests/test_m.F90 b/tests/test_m.F90 index aa9db2d63..c83c060e8 100644 --- a/tests/test_m.F90 +++ b/tests/test_m.F90 @@ -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