aphalo / ggpmisc

R package ggpmisc is an extension to ggplot2 and the Grammar of Graphics
https://docs.r4photobiology.info/ggpmisc
93 stars 6 forks source link

Increase unit-tests coverage #43

Open aphalo opened 1 year ago

aphalo commented 1 year ago

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 commented 3 months ago

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

aphalo commented 3 months ago

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 commented 2 months ago

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

aphalo commented 2 months ago

To do: