[Issue 5091] New: main runs after unittests
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 20 17:23:07 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5091
Summary: main runs after unittests
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: simen.kjaras at gmail.com
--- Comment #0 from Simen Kjaeraas <simen.kjaras at gmail.com> 2010-10-20 17:22:25 PDT ---
When compiling a program with dmd -unittest, after the unittests are run,
main() is called. This is rarely wanted behavior, so should not be the default.
Currently, it is possible to customize main to sidestep the problem:
void main( ) {
version( unittest ) {
} else {
// Your program
}
}
However, this is cluttering and mixes your application code with versioning
code.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list