Vincent Aravantinos wrote:
> --- In ocaml_beginners@yahoogroups.com, Hugo Ferreira <hmf@...> wrote:
>> What is a nonsense? The use of abstract types or the opening up of the
>> type and implementation details to external users?
>
> I think he is talking about doing both at a time. Which is indeed nonsense.
>
>> On a similar note: I too am interested in this issue due to the need
>> for testing modules. Consider the following:
>>
>> 1. I create two implementations, each conforming to a single interface.
>> 2. These implementations are "plugged-in" for use in another
>> (higher-order) module.
>> 3. However I need to test each implementation before use.
>> Note that due to implementation differences I need to access and
>> check stuff specifically to each implementation. Extending the
>> common interface won't help.
>>
>> Anyone have such issues? Anyone know of a way to deal with this?
>
> I am having the same problem and am thinking of just keeping the black box
tests in their own files as usual: they only access the interface (and thus test
only the interface and the accordance of the implementation to the interface);
and embedding the white box tests in the modules that we want to test.
>
> It seems quite a natural solution but I have not tried it in practice yet.
>
Since I keep my tests in separate files from the module source
this might not be the way to go for me.
H.F.
> V.
>
>
>
> ------------------------------------
>
> Archives up to December 31, 2008 are also downloadable at
http://www.connettivo.net/cntprojects/ocaml_beginners/
> The archives of the very official ocaml list (the seniors' one) can be found
at http://caml.inria.fr
> Attachments are banned and you're asked to be polite, avoid flames etc.Yahoo!
Groups Links
>
>
>