digitalmars.D - unittest and assert
- ElfQT (10/10) Sep 03 2005 Is it true that the first assert that fails breaks the execution?
- ElfQT (4/7) Sep 03 2005 Well, I figured it out that I can implement these on my own with a custo...
- ElfQT (3/6) Sep 03 2005 OK, or maybe not that nice, because I only can include __FILE__ and __LI...
- ElfQT (7/9) Sep 03 2005 As I begun to think about it, with the "nunit" unit testing framework (f...
- Charles (10/23) Sep 04 2005 Yea , built in unit tests seem a good idea, but there are serious
Is it true that the first assert that fails breaks the execution? That's not a nice thing. Unittest run should report all succeeding and failing cases in one run! Also, assert badly needs a message (to write when assert fails) part. Assert should report module,class,method not only the line number. And for me, a bit strange that unittests will run on first execution. Should be a different run. (If I am making a lib, do I have to make an executable out of it to unittest it?) ElfQT
Sep 03 2005
Unittest run should report all succeeding and failing cases in one run! Also, assert badly needs a message (to write when assert fails) part. Assert should report module,class,method not only the line number.Well, I figured it out that I can implement these on my own with a custom unittest class. (Using writefln, __FILE__, __LINE__) ElfQT
Sep 03 2005
Well, I figured it out that I can implement these on my own with a custom unittest class. (Using writefln, __FILE__, __LINE__)OK, or maybe not that nice, because I only can include __FILE__ and __LINE__ at every single assert call, and not in the class doing the reporting... (Since no #define or such. Should a mixin help?)
Sep 03 2005
Also, assert badly needs a message (to write when assert fails) part. Assert should report module,class,method not only the line number.As I begun to think about it, with the "nunit" unit testing framework (for the AssertEquals(<ValueofVariable>, <ExpectedValue>, <message>) format become the standard, because then the framework is able to report the value of the variable failing and the expected value. ElfQT
Sep 03 2005
Unittest run should report all succeeding and failing cases in one run!Yea I agree , I think most people do.And for me, a bit strange that unittests will run on first execution.Shouldbe a different run.Yea , built in unit tests seem a good idea, but there are serious limitations to the existing ones , I think most people will just build their own framework. Charlie "ElfQT" <dethjunk yahoo.com> wrote in message news:dfd0li$kql$1 digitaldaemon.com...Is it true that the first assert that fails breaks the execution? That's not a nice thing. Unittest run should report all succeeding and failing cases in one run! Also, assert badly needs a message (to write when assert fails) part. Assert should report module,class,method not only the line number. And for me, a bit strange that unittests will run on first execution.Shouldbe a different run. (If I am making a lib, do I have to make an executable out of it tounittestit?) ElfQT
Sep 04 2005