www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Unittests run without error when done individually, but when

reply pineapple <meapineapple gmail.com> writes:
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?
Jun 01 2016
parent Jonathan M Davis via Digitalmars-d-learn writes:
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
Jun 01 2016