Testing package proposed for Phobos

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Sun Feb 8 20:38:14 PST 2015


On Sun, Feb 08, 2015 at 06:06:59PM -0800, Walter Bright via Digitalmars-d wrote:
> I.e. by providing standard mockups for components, and standard tests
> for component protocols, we can significantly improve the unit testing
> and standard conformance of user designed components.

Yes, I've suggested this a long time ago but it seemed to have fallen by
the wayside. It would be good to provide standard testing stuff for:

- Non-forward input ranges.
- Forward but non-bidirectional ranges.
- Bidirectional but not random access ranges.
- Infinite ranges vs. finite ranges.
- Ranges with reference semantics vs. value semantics.
- Array-like ranges that are not arrays.

Ideally, every range-based function in Phobos should be tested with each
of these variations, to ensure correct semantics under all
representative use cases.


T

-- 
Everybody talks about it, but nobody does anything about it!  -- Mark Twain


More information about the Digitalmars-d mailing list