I am in a little strange situation.
I have to develop a big software module, which operates as an abstraction on a huge number of inputs (some thousand) to our software, presented by access functions - i will call them signals further. The module does some similar mapping operations on most of these signals, like changing the representation from integer to float, changing physical units or remap nominal values to other ones - depending on semantics and nature of the signals. Also some validations (like input set/range checks) are done signalwise, and some comm error validation is also done for signals and groups of them (return values of the access functions).
Now our test department wants to test small groups of the functionality - the units(tm) - like for every input-signal-group, and of course testing input routines mapping routines and and regrouped output-routines individually from each other, which totally makes sense.
But due to rigid rules on what is tested, each testable unit must be represented as own C object and tested as we will ship it. To allow this, any of the input, mapping and output routines need external interfaces. And we ship a library to be integrated in a bigger software system.
Now, any input and output-Routine is highly special (to some degree) as it calls specific access routines, any mapping routine is highly special (to some degree) as it provides the (general) mapping with signal specific magic numbers and so on. To have more fun, the especially I/O-Routines (and the used access routines) are not (under all conditions) reentrant. So... these functions must be called (always) in a certain way by my module, and MUST NOT under any circumstances be called by any other part of the software.
So... how can I provide some safety and encapsulation for these functions, although a "static" declaration of the functions is not possible, because of the test procedures, and my requirements document says it is my job to ensure calling correctness.
Any ideas?
Aucun commentaire:
Enregistrer un commentaire