testConfig_prg Program

program~~testconfig_prg~~UsesGraph program~testconfig_prg testConfig_prg module~config_mod config_mod module~config_mod->program~testconfig_prg module~kinds_mod kinds_mod module~kinds_mod->program~testconfig_prg module~kinds_mod->module~config_mod module~text_mod text_mod module~kinds_mod->module~text_mod module~time_mod time_mod module~kinds_mod->module~time_mod module~text_mod->module~config_mod module~time_mod->module~text_mod iso_fortran_env iso_fortran_env iso_fortran_env->module~text_mod iso_c_binding iso_c_binding iso_c_binding->module~time_mod
Help


Test program for config_mod

Calls

program~~testconfig_prg~~CallsGraph program~testconfig_prg testConfig_prg proc~testnewconfig testNewConfig program~testconfig_prg->proc~testnewconfig
Help

Source Code


Subroutines

subroutine testNewConfig()

Verify the operation of newConfig

Arguments

None

Source Code

program testConfig_prg
	!! Test program for config_mod
	!! @todo
	!! Add tests for each datatype
	use kinds_mod
	use config_mod
	implicit none
	
	call testNewConfig
	
contains

	subroutine testNewConfig
		!! Verify the operation of newConfig
		logical,dimension(1)::results
		type(config_t)::cfg
		
		logical::tLogical
		integer::tInteger
		real(wp)::tReal
		complex(wp)::tComplex
		real(wp),dimension(:),allocatable::tVector
		real(wp),dimension(:,:),allocatable::tMatrix
		character(:),allocatable::tString
		
		cfg = config_t('./input/testConfig.cfg')
		
		results(1) = allocated(cfg%pairs)
		
		tLogical = cfg%getLogical('logical')
		tInteger = cfg%getInteger('integer')
		tReal    = cfg%getReal('real')
		tComplex = cfg%getComplex('complex')
		tVector  = cfg%getVector('vector')
		tMatrix  = cfg%getMatrix('matrix')
		tString  = cfg%getString('string')
		
		if( .not.all(results) ) error stop "Failed newConfig check"
	end subroutine testNewConfig

end program testConfig_prg