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 bac
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 do
Just for your information, the name "DUnit" is already used by
Delphi.
Probably, you should name it "D2Unit" or "MarsUnit" ?
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 test_
alive dans ton petit village?
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 sep
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 respons
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 findin
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
T
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 examples
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,
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 in
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
documen
On 2/19/12 9:30 AM, Juan Manuel Cabo wrote:
People of the D world.. I give you DUnit (not to be confused with an old
tango DUnit, this one is for >= D2.057, and doesn't really require
phobos or tango (just you version the few writeln's of the runner, and
maybe
something else)).
https://github.co
I forgot to mention. All of this works flawlessly with D2.057 and
D2.058. But with previous versions, you might need to declare the:
mixin TestMixin;
at the bottom of the class. Otherwise, the test* methods were not
seen.
And excuse me for all the bad formatting in my post and all th
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:
People of the D world.. I give you DUnit (not to be confused with
an old
tango DUnit, this one is for >= D2.057, and doesn't really
require phobos or tango (just you version the few writeln's of
the runner, and maybe
something else)).
https://github.com/jmcabo/dunit
I've been developing
18 matches
Mail list logo