ggpmisc icon indicating copy to clipboard operation
ggpmisc copied to clipboard

Increase unit-tests coverage

Open aphalo opened this issue 2 years ago • 4 comments

As done with 'ggpp', unit tests need to be added to 'ggpmisc' so as to test the code better (in actual practice) and to achieve formally high coverage.

aphalo avatar Aug 06 '23 20:08 aphalo

Now we have > 30% coverage overall, but > 95% coverage for recently written code.

aphalo avatar May 23 '24 08:05 aphalo

The low coverage is in great part the result of calls to compute group and compute panel functions not being "seen" by the coverage estimate calculations. The only rather easy to implement solution seems to be to test these functions on their own, as they are named functions. It would help to add to them default arguments so that only the overrrideen arguments and data need to be passed arguments explicitly in the unit tests.

aphalo avatar May 26 '24 08:05 aphalo

Added unit tests for Markdown encoded labels. They work with ggtext::geom_richtext, but seem to fail with the newborn marquee::geom_marquee().

aphalo avatar Jun 03 '24 13:06 aphalo

To do:

  • [x] Unit tests for label utilities
  • [x] Unit tests for eq label utilities
  • [x] Add Markdown tests for stat_correlation(), stat_poly_eq(), stat_quant_eq(), stat_ma_eq
  • [x] Add default arguments to the compute-group functions
  • [ ] Add tests for the compute-group functions
  • [ ] Test coverage

aphalo avatar Jun 03 '24 13:06 aphalo