Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-08-31 Thread Shripad K
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

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-08-30 Thread xenon325
Just for your information, the name DUnit is already used by Delphi. Probably, you should name it D2Unit or MarsUnit ?

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-08-30 Thread linkrope
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

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-08-29 Thread Shripad K
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

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-05-29 Thread hezz
alive dans ton petit village?

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-03-21 Thread Juan Manuel Cabo
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

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-03-21 Thread Juan Manuel Cabo
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

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-03-21 Thread Rio
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

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-03-21 Thread Juan Manuel Cabo
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

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-03-18 Thread Marc P. Michel
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 :} ).

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-03-17 Thread Marc P. Michel
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

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-02-19 Thread Juan Manuel Cabo
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:

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-02-19 Thread Juan Manuel Cabo
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

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-02-19 Thread Jacob Carlborg
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

Re: DUnit - class MyTest { mixin TestMixin; void testMethod1() {} void testMethod2() {}}

2012-02-19 Thread Juan Manuel Cabo
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,