-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Description
The test coverage of copilot-core
is currently reported at 75% by Hackage.
Although there are exceptions to what we can test (record fields of existential types) or should test (proxies, automatically generated constructors and accessor functions), the coverage of our tests should include very top level definition and expression that can be tested without having to modify the implementation of copilot-core
itself.
Type
- Management: Increase coverage of tests.
Additional context
There are limitations to what we can test, or how we can instruct HPC to ignore certain symbols. At present, we don't have a simply way of modifying copilot-core
's cabal package to tick specific symbols or expressions. Future improvements to HPC may make this possible.
Requester
- Ivan Perez
Method to check presence of bug
Not applicable (not a bug).
Expected result
All top-level functions that are not automatically generated by the compiler are tested, except where testing them is not possible, when code is automatically generated (constructors, record accessor functions), or when values do not need to be fully evaluated (e.g., Proxy's, ()
).
Desired result
All top-level functions that are not automatically generated by the compiler are tested, except where testing them is not possible, when code is automatically generated (constructors, record accessor functions), or when values do not need to be fully evaluated (e.g., Proxy's, ()
).
Proposed solution
Add tests for all definitions in copilot-core
that are not automatically generated and can be tested without having to modify the implementation of the library (e.g., to force WHNF/NF in lazily evaluated values like Proxy).
Further notes
None.