Copilot-Language / copilot

A stream-based runtime-verification framework for generating hard real-time C code.
http://copilot-language.github.io
635 stars 50 forks source link

`copilot-core`: Increase test coverage #502

Closed ivanperez-keera closed 6 months ago

ivanperez-keera commented 6 months ago

Description

The test coverage of copilot-core is currently reported at 25% by Hackage. This is very low.

Although there are exceptions to what we can test (record fields of existential types) or should tests (proxies, automatically generated constructors and accessor functions), the coverage of our tests should be higher and anything that is not tested should be documented.

Type

Additional context

None.

Requester

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 or for code that is automatically generated (constructors, record accessor functions). Anything not tested is documented.

Desired result

All top-level functions that are not automatically generated by the compiler are tested, except where testing them is not possible or for code that is automatically generated (constructors, record accessor functions). Anything not tested is documented.

Proposed solution

Add tests for all definitions in Copilot.Core.Type and Copilot.Core.Type.Array, except record accessor functions.

Further notes

None.

ivanperez-keera commented 6 months ago

Change Manager: Confirmed that the issue exists.

ivanperez-keera commented 6 months ago

Technical Lead: Confirmed that the issue should be addressed.

ivanperez-keera commented 6 months ago

Technical Lead: Issue scheduled for fixing in Copilot 3.19.

Fix assigned to: @ivanperez-keera .

ivanperez-keera commented 6 months ago

Implementor: Solution implemented, review requested.

ivanperez-keera commented 6 months ago

Change Manager: Verified that:

ivanperez-keera commented 6 months ago

Change Manager: Implementation ready to be merged.