Sorry for the late reply. I thought I would be notified via mail
of your reply but I don't think this forum sends alerts. Thanks
for this suggestion. However its a bit different in the case of
event loops (unlike threads, where a thread.start() would spawn a
new thread and bring the control
Just for your information, the name DUnit is already used by
Delphi.
Probably, you should name it D2Unit or MarsUnit ?
Add some variable to the test case: bool finished;
Set the variable in the callback: finished = true;
Add something like
assertWithTimeout({return finished;});
at the end of the test case, following ev.run;
Does it help?
On Wednesday, 29 August 2012 at 19:20:25 UTC, Shripad K wrote:
How
How do I test callbacks/delegates which are not triggered
immediately? Especially when I need to do unit tests with an
event loop?
A simple example from my codebase (SaaSy here is a custom HTTP
client to an API endpoint):
class TestSaaSy {
mixin TestMixin;
// this works
void
alive dans ton petit village?
On Saturday, 17 March 2012 at 12:30:49 UTC, Marc P. Michel wrote:
On Monday, 20 February 2012 at 01:49:04 UTC, Juan Manuel Cabo
wrote:
I thought I could do a better effort to describe why DUnit is
so extraordinary,
for a native language, especially for those unfamiliar with
xUnit frameworks
On Sunday, 18 March 2012 at 11:05:59 UTC, Marc P. Michel wrote:
Oh and also, changing version(linux) with version(Posix)
for the color output management would be great. ( I'm on
FreeBSD and was wondering why I had no colors as advertised :}
).
Yeahp, will fix it. Sorry!
Thanks for finding
On Wednesday, 21 March 2012 at 17:29:59 UTC, Juan Manuel Cabo
wrote:
Btw, here is the whole list:
http://www.junit.org/junit/javadoc/3.8.1/junit/framework/Assert.html
Do you have any thoughts?
Be careful: for JUnit 4 there is a separation of concerns.
The assertions are now the
On Wednesday, 21 March 2012 at 20:04:39 UTC, Rio wrote:
On Wednesday, 21 March 2012 at 17:29:59 UTC, Juan Manuel Cabo
wrote:
Btw, here is the whole list:
http://www.junit.org/junit/javadoc/3.8.1/junit/framework/Assert.html
Do you have any thoughts?
Be careful: for JUnit 4 there is a
Oh and also, changing version(linux) with version(Posix) for
the color output management would be great. ( I'm on FreeBSD and
was wondering why I had no colors as advertised :} ).
On Monday, 20 February 2012 at 01:49:04 UTC, Juan Manuel Cabo
wrote:
I thought I could do a better effort to describe why DUnit is
so extraordinary,
for a native language, especially for those unfamiliar with
xUnit frameworks
This is great stuff, thanks !
Anyway, I'm not fond of your
Unit testing framework ('dunit')
Allows to define unittests simply as methods which names start
with 'test'.
The only thing necessary to create a unit test class, is to
declare the mixin TestMixin inside the class. This will register
the class and its test methods for the test runner.
License:
Interesting, congrats. A common question that will come up is
comparing, contrasting, and integrating your work with the
existing unittest language feature. You may want to address
these issues directly in the documentation.
Thanks!! I'll put it in the doc (and also clean up my crude
On 2012-02-19 19:18, Juan Manuel Cabo wrote:
Interesting, congrats. A common question that will come up is
comparing, contrasting, and integrating your work with the existing
unittest language feature. You may want to address these issues
directly in the documentation.
Thanks!! I'll put it
I thought I could do a better effort to describe why DUnit is so extraordinary,
for a native language, especially for those unfamiliar with xUnit frameworks
or TDD. So here it goes:
*What is a unit test*
Unit tests, ideally, test a specific functionality in isolation, so that
if the test fails,
15 matches
Mail list logo