digitalmars.D.bugs - [Issue 776] New: Unittest section inside a template does not alway execute.
- d-bugmail puremagic.com (32/32) Dec 30 2006 http://d.puremagic.com/issues/show_bug.cgi?id=776
- d-bugmail puremagic.com (12/12) Dec 31 2006 http://d.puremagic.com/issues/show_bug.cgi?id=776
- d-bugmail puremagic.com (10/10) Apr 27 2007 http://d.puremagic.com/issues/show_bug.cgi?id=776
http://d.puremagic.com/issues/show_bug.cgi?id=776 Summary: Unittest section inside a template does not alway execute. Product: D Version: 0.178 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: pchapin ecet.vtc.edu Consider the following two file program: ----> main.d <---- import other; int main( ) { Foo!(int) my_foo = new Foo!(int); return( 0 ); } ----> other.d <---- class Foo(T) { unittest { assert( 1 == 0 ); } }; When compiled with 'dmd -unittest main.d other.d' the program compiles and links without error. However, the unit test does not execute (or at least the assertion does not fire). Moving the class template Foo(T) into main.d and throwing away other.d *does* cause the assertion to fire. --
Dec 30 2006
http://d.puremagic.com/issues/show_bug.cgi?id=776 Added to DStress as http://dsrtess.kuehne.cn/compile/u/unittest_10_A.d http://dsrtess.kuehne.cn/compile/u/unittest_10_B.d http://dsrtess.kuehne.cn/compile/u/unittest_10_C.d http://dsrtess.kuehne.cn/norun/u/unittest_10_D.d http://dsrtess.kuehne.cn/norun/u/unittest_10_E.d http://dsrtess.kuehne.cn/norun/u/unittest_10_F.d http://dsrtess.kuehne.cn/norun/u/unittest_10_G.d http://dsrtess.kuehne.cn/norun/u/unittest_10_H.d --
Dec 31 2006
http://d.puremagic.com/issues/show_bug.cgi?id=776 thomas-dloop kuehne.cn changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED OS/Version|Windows |All Resolution| |FIXED fixed in DMD-1.005 --
Apr 27 2007