josherrickson / rlemon

rlemon - R interface to C++ LEMON graph library
http://errickson.net/rlemon/
8 stars 3 forks source link

Increase Test Code Coverage #8

Closed arav-agarwal2 closed 2 years ago

arav-agarwal2 commented 4 years ago

Original goals below:

josherrickson commented 2 years ago

Looking at some files, it seems like most of this is checked off?

josherrickson commented 2 years ago

I've code-coverage against the package; please see the coverage.html file. Any insights into whether we can up that coverage?

arav-agarwal2 commented 2 years ago

Regarding the former - that's likely the case. I'm unsure where I/Aditya left off on testing, but something tells me we tested the R/C++ interface much more than what the total coverage report indicates, as the source folder has coverage at 97.51%. ( And that's including the conversion function at src/conversion.h, which I do not think is being used and we should probably remove ).

Regarding the latter - it'll depend heavily on what is left in LEMON that we can test, as I'd wager some of it might be class-related stuff that we're not explicitly using in our interface. For sections like Matching, we should probably include tests on dense graphs, as the coverage report seems to indicate we're not hitting that section hard enough. Conversely, for sections like lemon/adaptors.h, I'm not convinced improving test coverage there will help substantially, as these seem to be mainly convenience functions that we're not handling due to how we process graphs.

josherrickson commented 2 years ago

Thanks. I just pushed up a commit expanding to cover 100% of the R/ directory. I think down the road if we could get 100% of src/ files covered, that'd be great, and whatever of inst/ we get, we get.

No rush on this.

josherrickson commented 2 years ago

Gonna close this; I'm happy with 100% on R/. Users will never enter src/ without first entering R/, so we can mostly test in there. We may see occasional errors in src/ that we haven't tested for, but can address those as they arrive.