-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop-copilot-core-coverage'. Close #555.
**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, `()`). **Solution implemented** 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). Running the code coverage in GHC produces a report indicating that 35/36 top-level definitions in Copilot.Core.Type and 4/4 in Copilot.Core.Type.Array. The top-level definition not covered in Copilot.Core.Type is deprecated and will be removed in a future release. There's full alternative coverage for both modules (100%), and the expressions not covered are Proxys, and arguments not evaluated due to laziness. **Further notes** None.
- Loading branch information
Showing
3 changed files
with
267 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.