The run_model_test_cases function is a key part of the BioCro model
testing system. See model_testing for more information.
For each test case, the following checks will be performed:
The model definition must be valid according to
validate_dynamical_system_inputs.
The model will be run, which should not cause any errors or warnings.
For each test case where check_outputs was set to TRUE, the
following additional checks comparing the new result to a saved result will be
performed:
The new result should have the same number of rows as the old result.
With the exception of any columns in quantities_to_ignore, all
columns in the stored result should be included in the new result.
With the exception of any columns in quantities_to_ignore, all
columns in the stored result should have the same values in the new
result (to within the specified tolerance). This check will be made
using all.equal with tolerance set to
relative_tolerance.
When comparing the values of each column, values will only be checked for
every Nth row of the new result, where N is the value of row_interval
specified when defining the test case.
For each test case where check_outputs is TRUE, the stored
result should be created using the update_stored_model_results
function.
If any of the above checks fail for any of the supplied test cases, an error
will be thrown with a descriptive message.
Besides the checks above, a warning message will also be sent to the user if
there are columns in the new result that are not included in the saved result.