You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When unit testing and checking for the receipt of an external enumeration class in the history of telemetry or events, the user is required to create an instance of the class, assign a value to it, and then pass the instance to the checking function.
Proposal would be to add an overloaded version of the checker such that the enumeration value can be checked.
(Trying to find an example in the F Prime code. Ran in to this on a project using F Prime.)
Rationale
Makes unit test code less cluttered.
The text was updated successfully, but these errors were encountered:
fprime-enum-test.txt
Proposed solution attached.
The benefits of this enhancement would be:
More concise test code:
Eliminates boilerplate enum instance creation
Reduces lines of code needed for checks
Makes tests more readable
More direct value checking:
Tests can directly reference enum values
Reduces potential for errors in enum instance setup
Makes the intent of the test clearer
Better maintainability:
Less code to maintain
Easier to update when enum values change
More straightforward test logic
The proposal aligns well with F' goals of improving developer experience while maintaining robust testing capabilities.
Feature Description
When unit testing and checking for the receipt of an external enumeration class in the history of telemetry or events, the user is required to create an instance of the class, assign a value to it, and then pass the instance to the checking function.
Proposal would be to add an overloaded version of the checker such that the enumeration value can be checked.
(Trying to find an example in the F Prime code. Ran in to this on a project using F Prime.)
Rationale
Makes unit test code less cluttered.
The text was updated successfully, but these errors were encountered: