Thread overview | ||||||
---|---|---|---|---|---|---|
|
July 13, 2004 no output in unittest | ||||
---|---|---|---|---|
| ||||
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. |
July 13, 2004 Re: no output in unittest | ||||
---|---|---|---|---|
| ||||
Posted in reply to Florian RIVOAL | 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 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. > > |
July 13, 2004 Re: no output in unittest | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | 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... >> 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. >> >> > > -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ |
July 14, 2004 Re: no output in unittest | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | 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); |
Copyright © 1999-2021 by the D Language Foundation