https://issues.dlang.org/show_bug.cgi?id=14082

--- Comment #3 from Steven Schveighoffer <[email protected]> ---
(In reply to drug007 from comment #2)
> I agree. Also I'm curious why RedBlackTree instance in Phobos unittest get
> less from my private unittest?

RedBlackTree unit tests are done inside the class, so every instantiation of
RBT creates its own set of unit tests. It's actually quite useful, I found
about 3 compiler bugs because of it.

But the drawback is that EVERY instantiation of RBT creates its own unit tests.
And it's nearly impossible to make a unit test that works for every
instantation.

So I have code that limits when unit tests run, based on the *type* of the data
stored. But I never thought of limiting it based on the lambda. I just have to
add a few static ifs, and you will be all set.

--

Reply via email to