Unittests run without error when done individually, but when unittesting the package some fail

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 1 17:19:22 PDT 2016


On Wednesday, June 01, 2016 23:58:52 pineapple via Digitalmars-d-learn wrote:
> How this could possibly be happening is confounding me and I have
> no idea if it's something I missed or some contrived compiler bug.
>
> This is the package.d that previously I've compiled with unittest
> every so often as a way of doing regression testing -
> https://github.com/pineapplemachine/mach.d/blob/master/mach/range/package.d
>
> Currently, when compiled as is, tests in `indexof` and `contains`
> (a depending module) fail. If those two are commented out,
> everything else passes. If either of those modules is unittested
> individually, rather than with the others as part of the package,
> everything passes.
>
> What's going on here?

Well, if you haven't already tried it, I'd advise adding some print
statements to verify that the tests are actually running in both cases and
that something isn't going wrong to cause the failing tests to not be run in
the case where they seem to be passing.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list