9 use fruit
, only : assert_equals, assert_true, assert_false
18 class(*),
pointer :: raw_data
22 raw_data=>c_get(options_database,
"viscosity_enabled")
23 call assert_false(
conv_to_logical(raw_data, .false.),
"Test viscosity is not enable")
25 raw_data=>c_get(options_database,
"rhobous")
26 call assert_equals(1.0,
conv_to_real(raw_data, .false.),
"Test setup configuration values")
28 raw_data=>c_get(options_database,
"passive_q")
29 call assert_false(
conv_to_logical(raw_data, .false.),
"Test logical value is false when missing")
31 raw_data=>c_get(options_database,
"number_q_fields")
32 call assert_equals(5,
conv_to_integer(raw_data, .false.),
"Test integer values read")
34 raw_data=>c_get(options_database,
"checkpoint_enable_write")
35 call assert_true(
conv_to_logical(raw_data, .false.),
"Test result when entry is not defined in the user file but in the global file")
42 use fruit
, only : init_fruit, run_test_case, fruit_summary
Generic add interface for adding different types of data to the databases.
integer function, public options_get_array_size(options_database, key)
Gets the size of the array held in the options database corresponding to a specific key...
program test_configuration_file_parser_driver
subroutine test_parse_configuration_file
character(len=string_length) function, public options_get_string(options_database, key, index)
Retrieves a string value from the database that matches the provided key.
Conversion between common inbuilt FORTRAN data types.
Converts data types to strings.
subroutine, public options_remove_key(options_database, key)
Removes a specific key from the options database, if it is an array then the entire array is removed...
Converts data types to logical.
Map data structure that holds string (length 20 maximum) key value pairs.
Determines whether a data item can be represented as a logical or not.
Collection data structures.
Determines whether a data item can be represented as an integer or not.
Converts data types to real.
Determines whether a data item can be represented as a real or not.
Manages the options database. Contains administration functions and deduce runtime options from the c...
subroutine, public parse_configuration_file(options_database, user_configuration_file)
Parses a specific configuration and adds the contents into the options database.
Parses a configuration file and loads the contents into the options database which can then be intero...
Converts data types to integers.
logical function, public options_has_key(options_database, key)
Determines whether a specific key is in the database.