Summary: Use __LINE__ to pick number in unittest block names
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Jonathan M Davis <> 2011-02-15 01:00:14 
PST ---
At the moment, we can't name unit tests. Ideally we could, but for now, we
can't. And this is a big problem in that any exceptions that are thrown from a
function called directly or indirectly by a unittest block ends up with a
fairly useless stack trace because the function generated from the unittest
block is something like _unittest1298, which gives absolutely no clue as to
which unittest block it's for. I have no idea how that number is generated, but
as far as I can tell, it's useless. Don suggested that we use __LINE__ to
generate that number so that it actually _is_ meaningful. So, I'm opening this
enhancement request for that to be done. I still think that we should have
named unittest blocks at some point (e.g. unittest(testName) {}), but using
__LINE__ in the name would be a big help.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to