[Issue 4669] New: Unit tests do not work in libraries compiled by dmd with -lib
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 17 08:55:18 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4669
Summary: Unit tests do not work in libraries compiled by dmd
with -lib
Product: D
Version: D1 & D2
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mike.linford at gmail.com
--- Comment #0 from Mike Linford <mike.linford at gmail.com> 2010-08-17 08:55:13 PDT ---
The following unit test in mylib.d is not run:
mylib.d:
1 module mylib;
2
3 void blah()
4 {
5 }
6 unittest
7 {
8 assert(false);
9 }
10
test.d:
1 module test;
2
3 import mylib;
4
5 void main()
6 {
7 blah();
8 }
9
Makefile:
1 test : mylib.a test.d
2 dmd -unittest test.d mylib.a
3
4 mylib.a : mylib.d
5 dmd -unittest -lib mylib.d
6
7 clean :
8 rm -f test mylib.a *.o
9
However, it WILL be run if the project is compiled as follows:
dmd -unittest -c mylib.d
ar -rc mylib.a mylib.o
dmd -unittest test.d mylib.a
--
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