Go to the documentation of this file.
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
program test_configuration_file_parser_driver
Conversion between common inbuilt FORTRAN data types.
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.
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.
subroutine, public parse_configuration_file(options_database, user_configuration_file)
Parses a specific configuration and adds the contents into the options database.
Converts data types to integers.
Collection data structures.
Converts data types to logical.
subroutine test_parse_configuration_file
Generic add interface for adding different types of data to the databases.
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.
Parses a configuration file and loads the contents into the options database which can then be intero...
logical function, public options_has_key(options_database, key)
Determines whether a specific key is in the database.
Converts data types to strings.
Determines whether a data item can be represented as a real or not.
Determines whether a data item can be represented as an integer or not.
Converts data types to real.
Manages the options database. Contains administration functions and deduce runtime options from the c...
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.