digitalmars.D - no output in unittest
- Florian RIVOAL (8/8) Jul 13 2004 i have been playing around with unittest, and i am quite happy that it i...
- Ben Hinkle (10/18) Jul 13 2004 I've used printf in unittests just fine, so there might be a problem wit...
- Regan Heath (8/32) Jul 13 2004 Or you've placed your unittest in the 'wrong' place, is it running at al...
- Florian RIVOAL (4/6) Jul 13 2004 IIRC assert(0) does fail, and i still get no output. I ll try to play ar...
i have been playing around with unittest, and i am quite happy that it is there. but why is it impossible to display something from there? when i call writef nothing happens. sure, asserts are a good thing, but sometimes, reading some text output is just the most simple way to check if everything is write. Usualy, the tests i perform contain as much printfs as asserts. maybe more. If some people prefer to use only assert, why not. but i am not sure why the language should prevent me to output text in the unittext.
Jul 13 2004
I've used printf in unittests just fine, so there might be a problem with writef. "Florian RIVOAL" <Florian_member pathlink.com> wrote in message news:cd0nej$30v$1 digitaldaemon.com...i have been playing around with unittest, and i am quite happy that it isthere.but why is it impossible to display something from there? when i callwritefnothing happens. sure, asserts are a good thing, but sometimes, reading some text output isjustthe most simple way to check if everything is write. Usualy, the tests iperformcontain as much printfs as asserts. maybe more. If some people prefer touseonly assert, why not. but i am not sure why the language should prevent metooutput text in the unittext.
Jul 13 2004
Or you've placed your unittest in the 'wrong' place, is it running at all, try assert(0); As posted by Duncan earlier sometimes depending on where you place your unittest it does not run. On Tue, 13 Jul 2004 10:24:53 -0400, Ben Hinkle <bhinkle mathworks.com> wrote:I've used printf in unittests just fine, so there might be a problem with writef. "Florian RIVOAL" <Florian_member pathlink.com> wrote in message news:cd0nej$30v$1 digitaldaemon.com...-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/i have been playing around with unittest, and i am quite happy that it isthere.but why is it impossible to display something from there? when i callwritefnothing happens. sure, asserts are a good thing, but sometimes, reading some text output isjustthe most simple way to check if everything is write. Usualy, the tests iperformcontain as much printfs as asserts. maybe more. If some people prefer touseonly assert, why not. but i am not sure why the language should prevent metooutput text in the unittext.
Jul 13 2004
IIRC assert(0) does fail, and i still get no output. I ll try to play around a bit more with this, to be sure of what's happening, and I ll tell you all what happens then. In article <opsa3j4qwd5a2sq9 digitalmars.com>, Regan Heath says...Or you've placed your unittest in the 'wrong' place, is it running at all, try assert(0);
Jul 13 2004