Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-01-22 08:58:12

At 09:53 PM 1/21/2002, Andrei Alexandrescu wrote:

>> In addition, the predefined policies need to be tested as well. This
>> done policy by policy if each policy has a formal specification and
>> behavior is not affected by the parent SmartPtr (which implies no
>> interaction between policies.)
>I think that that's the main point. As long as policies are orthogonal,
>can be tested in isolation. For example, if CheckingPolicy doesn't
>with any other policy, a suite can test all CheckingPolicy
>using some arbitrary choices for the other policies.
>Otherwise, I was thinking of a testing strategy similar to Jeremy's -
>are generated by templates, and testing specific cases/behaviors are
>with specialization of the test cases.

Yes, even if policies interact, they can still be tested in isolation if
the interaction is well-specified and bounded.

For example, let's say StoragePolicy is specified to always supply one type
(say pointer_type) and one function (say get()) via its public interface.

An OwnershipPolicy which accesses a StoragePolicy can still be tested in
isolation. Its test driver will have to supply one or more dummy
StoragePolicys which meet the requirements (supply well-formed pointer_type
and get()) but do nothing more.


Boost list run by bdawes at, gregod at, cpdaniel at, john at