Boost logo

Boost :

From: vesa_karvonen (vesa_karvonen_at_[hidden])
Date: 2002-01-21 11:29:29


--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> Everyone that believes in policy-based designs

Depends on what you mean by policy based designs.

> ought to consider the following
>
> Assignment: Write the unit test for Loki::SmartPtr that probes
>
> a) all possible combinations of the supplied policies;
> b) user-defined policies.

Well, although the problem certainly isn't trivial, I think that the
problem isn't nearly as hard as it may seem. (Of course, it is quite
difficult to write tests for user-defined policies in advance. :)

The basic idea is explained in C&E (I don't have it at home so I
can't give page numbers for reference). Basically you just write a
suitable test generator (template).

However, I'm not so sure that all combinations need to be tested. You
should concentrate testing on what might brake. I'd probably start
with O(1) test cases per policy. Then I'd analyze where policy
interaction needs to be considered.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk