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
Is your feature request related to a problem? Please describe.
All other unit test modules (es, evs, tbl, time) go through a wrapper provided in the support code called UT_CallTaskPipe to invoke a command handler via the task's message handler function. This helper function would set up the MSG stubs properly to dispatch to the given command code, avoiding the need to repeat the same setup calls dozens of times in the UT.
For historical reasons, the SB unit test did not do this - because the message accessor functions were also implemented in SB, and therefore it could not rely on stub behavior to set up proper dispatch (i.e. it had to do the "real" thing).
However, with the advent of the separate MSG module, this is no longer the case. The sb_UT.c now uses/sets up MSG stubs to do the dispatch, but it was never converted to use the same wrapper that other modules do. Instead, the same setup code is repeated all over the tests.
Describe the solution you'd like
Convert oft-repeated sequences like:
Additional context
This is initially for clean up and readability, but it greatly improves flexibility too - if/when the core modules switch to a more intelligent verification and dispatch method, only UT_CallTaskPipe needs to be updated to support the dispatch method, not dozens (or even hundreds) of different test cases.
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
jphickey
added a commit
to jphickey/cFE
that referenced
this issue
Oct 6, 2021
Is your feature request related to a problem? Please describe.
All other unit test modules (es, evs, tbl, time) go through a wrapper provided in the support code called
UT_CallTaskPipe
to invoke a command handler via the task's message handler function. This helper function would set up the MSG stubs properly to dispatch to the given command code, avoiding the need to repeat the same setup calls dozens of times in the UT.For historical reasons, the SB unit test did not do this - because the message accessor functions were also implemented in SB, and therefore it could not rely on stub behavior to set up proper dispatch (i.e. it had to do the "real" thing).
However, with the advent of the separate MSG module, this is no longer the case. The sb_UT.c now uses/sets up MSG stubs to do the dispatch, but it was never converted to use the same wrapper that other modules do. Instead, the same setup code is repeated all over the tests.
Describe the solution you'd like
Convert oft-repeated sequences like:
To be:
Additional context
This is initially for clean up and readability, but it greatly improves flexibility too - if/when the core modules switch to a more intelligent verification and dispatch method, only UT_CallTaskPipe needs to be updated to support the dispatch method, not dozens (or even hundreds) of different test cases.
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: