Skip to content
Izaak Beekman edited this page Jun 15, 2015 · 14 revisions

Test coverage

The code coverage information on this page was automatically generated by the FoBiS.py build tool and gcov for the master branch of json-fortran. This same information is sent to Codecov.io and produces the badge shown on the README.md. Codecov.io can suggest chunks of the library that are uncovered and will make the largest impact on the overall coverage. This is a good place to start when trying to increase code coverage. Let’s keep the coverage trending upwards over time!

codecov.io

Note: Codecov.io is currently not accurately graphing coverage when merging coverage from different travis-ci builds.

Generating this coverage information

Since Unicode support has been added to json-fortran and the library has undergone some speed optimization certain code paths are only reachable with Unicode enabled or Unicode disabled. Because of this, to get a full picture of the test coverage, coverage reports must be merged from building the library and running the tests with and without Unicode support. To merge gcov results, use gccr (with the -n and -c flags) from: https://github.com/eel3/gccr. Here is the procedure:

./build.sh --coverage # build library & run tests, no Unicode
gcov -o lib src/json_module.F90
mv json_module.F90.gcov json_module-no-unicode.F90.gcov
rm -r lib bin
./build.sh --coverage --enable-unicode # build & test with unicode
gcov -o lib src/json_module.F90
mv json_module.F90.gcov json_module-unicode.F90.gcov
gccr.pl -n -c json_module-no-unicode.F90.gcov no-unicode json_module-unicode.F90.gcov unicode > json_module.F90.gcov
rm json_module-no-unicode.F90.gcov json_module-unicode.F90.gcov # just leave the merged copy
FoBiS.py rule -gcov_analyzer . # produce json_module.F90.gcov.md

Coverage analysis of json_module.F90

Metrics Analysis
Number of executable lines 1461
Number of executed lines 1197 82%
Number of unexecuted lines 264 18%
Number of average hits per executed lines 657276
Number of procedures 162
Number of executed procedures 135 83%
Number of unexecuted procedures 27 17%
Number of average hits per executed procedures 47702

lines procedures

Unexecuted procedures

Many of the procedures below are private specific procedures only accessible through a public overloaded interface, so to test them the generic procedure must be called with the correct arguments to resolve to an un-exercised specific procedure.

  • subroutine wrap_json_file_get_double_vec
  • subroutine json_file_get_logical_vec
  • subroutine wrap_json_file_get_logical_vec
  • subroutine json_file_update_string_name_ascii
  • subroutine json_file_update_string_val_ascii
  • subroutine wrap_json_update_integer
  • subroutine json_update_string_name_ascii
  • subroutine json_update_string_val_ascii
  • subroutine json_value_add_string_val_ascii
  • subroutine json_value_add_string_vec_name_ascii
  • subroutine json_value_add_string_vec_val_ascii
  • subroutine wrap_json_get_integer_with_path
  • subroutine json_get_integer_vec
  • subroutine get_int_from_array
  • subroutine wrap_json_get_integer_vec_with_path
  • subroutine wrap_json_get_double_with_path
  • subroutine json_get_double_vec
  • subroutine get_double_from_array
  • subroutine wrap_json_get_double_vec_with_path
  • subroutine json_get_logical_vec
  • subroutine get_logical_from_array
  • subroutine json_get_logical_vec_with_path
  • subroutine get_logical_from_array
  • subroutine wrap_json_get_logical_vec_with_path
  • subroutine wrap_json_get_string_with_path
  • subroutine wrap_json_get_array_with_path
  • subroutine add_character_to_string

Executed procedures

  • subroutine destroy_json_data: tested 1554248 times
  • subroutine json_file_destroy: tested 20 times
  • subroutine json_file_move_pointer: tested 2 times
  • subroutine json_file_load: tested 19 times
  • subroutine json_file_load_from_string: tested 5 times
  • subroutine wrap_json_file_load_from_string: tested 2 times
  • subroutine json_file_print_to_console: tested 8 times
  • subroutine json_file_print_1: tested 6 times
  • subroutine json_file_print_2: tested 3 times
  • subroutine json_file_print_to_string: tested 5 times
  • subroutine json_file_variable_info: tested 2 times
  • subroutine wrap_json_file_variable_info: tested 1 times
  • subroutine json_info: tested 18 times
  • subroutine json_file_get_object: tested 12 times
  • subroutine wrap_json_file_get_object: tested 5 times
  • subroutine json_file_get_integer: tested 8 times
  • subroutine wrap_json_file_get_integer: tested 4 times
  • subroutine json_file_get_integer_vec: tested 2 times
  • subroutine wrap_json_file_get_integer_vec: tested 1 times
  • subroutine json_file_get_double: tested 6 times
  • subroutine wrap_json_file_get_double: tested 3 times
  • subroutine json_file_get_double_vec: tested 8 times
  • subroutine json_file_get_logical: tested 2 times
  • subroutine wrap_json_file_get_logical: tested 1 times
  • subroutine json_file_get_string: tested 80 times
  • subroutine wrap_json_file_get_string: tested 38 times
  • subroutine json_file_get_string_vec: tested 2 times
  • subroutine wrap_json_file_get_string_vec: tested 1 times
  • subroutine json_initialize: tested 52 times
  • subroutine json_clear_exceptions: tested 68 times
  • subroutine json_throw_exception: tested 28 times
  • subroutine wrap_json_throw_exception: tested 3 times
  • subroutine json_check_for_errors: tested 6 times
  • subroutine json_value_create: tested 777128 times
  • subroutine json_value_remove: tested 10 times
  • subroutine json_value_remove_if_present: tested 2 times
  • subroutine wrap_json_value_remove_if_present: tested 1 times
  • subroutine json_file_update_integer: tested 2 times
  • subroutine wrap_json_file_update_integer: tested 1 times
  • subroutine json_file_update_logical: tested 4 times
  • subroutine wrap_json_file_update_logical: tested 2 times
  • subroutine json_file_update_real: tested 4 times
  • subroutine wrap_json_file_update_real: tested 2 times
  • subroutine json_file_update_string: tested 4 times
  • subroutine wrap_json_file_update_string: tested 2 times
  • subroutine json_update_logical: tested 6 times
  • subroutine wrap_json_update_logical: tested 1 times
  • subroutine json_update_double: tested 6 times
  • subroutine wrap_json_update_double: tested 1 times
  • subroutine json_update_integer: tested 2 times
  • subroutine json_update_string: tested 6 times
  • subroutine wrap_json_update_string: tested 1 times
  • subroutine json_value_add_member: tested 777068 times
  • subroutine json_value_add_double: tested 44 times
  • subroutine wrap_json_value_add_double: tested 21 times
  • subroutine json_value_add_double_vec: tested 24 times
  • subroutine wrap_json_value_add_double_vec: tested 12 times
  • subroutine json_value_add_integer: tested 224 times
  • subroutine wrap_json_value_add_integer: tested 12 times
  • subroutine json_value_add_integer_vec: tested 8 times
  • subroutine wrap_json_value_add_integer_vec: tested 4 times
  • subroutine json_value_add_logical: tested 10 times
  • subroutine wrap_json_value_add_logical: tested 4 times
  • subroutine json_value_add_logical_vec: tested 4 times
  • subroutine wrap_json_value_add_logical_vec: tested 2 times
  • subroutine json_value_add_string: tested 72 times
  • subroutine wrap_json_value_add_string: tested 25 times
  • subroutine json_value_add_string_name_ascii: tested 10 times
  • subroutine escape_string: tested 144 times
  • subroutine json_value_add_string_vec: tested 12 times
  • subroutine wrap_json_value_add_string_vec: tested 6 times
  • subroutine json_value_get_by_index: tested 58 times
  • subroutine json_value_get_by_name_chars: tested 179 times
  • subroutine wrap_json_value_get_by_name_chars: tested 1 times
  • subroutine json_value_to_string: tested 7 times
  • subroutine json_print_1: tested 14 times
  • subroutine json_print_2: tested 2 times
  • subroutine write_it: tested 2257 times
  • subroutine json_get_by_path: tested 108 times
  • subroutine wrap_json_get_by_path: tested 1 times
  • subroutine json_get_integer: tested 10 times
  • subroutine json_get_integer_with_path: tested 8 times
  • subroutine json_get_integer_vec_with_path: tested 2 times
  • subroutine get_int_from_array: tested 4 times
  • subroutine json_get_double: tested 30 times
  • subroutine json_get_double_with_path: tested 6 times
  • subroutine json_get_double_vec_with_path: tested 8 times
  • subroutine get_double_from_array: tested 24 times
  • subroutine json_get_logical: tested 4 times
  • subroutine json_get_logical_with_path: tested 4 times
  • subroutine wrap_json_get_logical_with_path: tested 1 times
  • subroutine json_get_string: tested 64 times
  • subroutine json_get_string_with_path: tested 80 times
  • subroutine json_get_string_vec: tested 2 times
  • subroutine get_chars_from_array: tested 6 times
  • subroutine json_get_string_vec_with_path: tested 4 times
  • subroutine get_chars_from_array: tested 20 times
  • subroutine wrap_json_get_string_vec_with_path: tested 1 times
  • subroutine json_get_array: tested 16 times
  • subroutine json_get_array_with_path: tested 14 times
  • subroutine json_parse_file: tested 19 times
  • subroutine json_parse_string: tested 11 times
  • subroutine wrap_json_parse_string: tested 3 times
  • subroutine annotate_invalid_json: tested 6 times
  • subroutine get_current_line_from_file_sequential: tested 1 times
  • subroutine get_current_line_from_file_stream: tested 1 times
  • subroutine json_value_create_logical: tested 2 times
  • subroutine wrap_json_value_create_logical: tested 1 times
  • subroutine json_value_create_integer: tested 2 times
  • subroutine wrap_json_value_create_integer: tested 1 times
  • subroutine json_value_create_double: tested 2 times
  • subroutine wrap_json_value_create_double: tested 1 times
  • subroutine json_value_create_string: tested 2 times
  • subroutine wrap_json_value_create_string: tested 1 times
  • subroutine json_value_create_null: tested 2 times
  • subroutine wrap_json_value_create_null: tested 1 times
  • subroutine json_value_create_object: tested 38 times
  • subroutine wrap_json_value_create_object: tested 19 times
  • subroutine json_value_create_array: tested 4 times
  • subroutine wrap_json_value_create_array: tested 2 times
  • subroutine to_logical: tested 19928 times
  • subroutine to_integer: tested 100002 times
  • subroutine to_double: tested 39916 times
  • subroutine to_string: tested 497690 times
  • subroutine to_null: tested 10 times
  • subroutine to_object: tested 79706 times
  • subroutine to_array: tested 39882 times
  • subroutine parse_string: tested 2110528 times
  • subroutine parse_for_chars: tested 19920 times
  • subroutine parse_number: tested 139640 times
  • subroutine push_char: tested 279286 times
  • subroutine integer_to_string: tested 534 times
  • subroutine real_to_string: tested 76 times
  • subroutine compact_real_string: tested 76 times
  • subroutine json_print_error_message: tested 6 times
Clone this wiki locally