www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21333] New: runModuleUnitTests inner code should be available


          Issue ID: 21333
           Summary: runModuleUnitTests inner code should be available as a
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: schveiguy yahoo.com

Currently, in order to affect the behavior of the default unit tester, you must
reimplement it.

In this code:

If you define a default unit tester, it skips the normal running of unittests.
The meat of actually running the unit tests should be abstracted into a
function, such that you can call it but just affect the result (like if you
don't want to run main, but you want to suppress a successful output).

Simple fix, just abstract the unit test running into its own function.

Oct 20 2020