Re: Unit Threaded - a unit testing library for D

2013-08-28 Thread Atila Neves
Not at all. In fact, I was playing with using it to do integration testing at work for our C++ code (it has a C interface). I guess I was just focussed on unit testing because I got annoyed at how long our unit tests* take to run, which was what led me to write the C++11 version to begin with.

Unit Threaded - a unit testing library for D

2013-08-27 Thread Atila Neves
My very first D project is now feature-complete as far as I can see (alpha) and I'd like to share it with the community: https://github.com/atilaneves/unit-threaded There are more details on github but here are the highlights: 1. Automatic registration of unit tests via compile-time

Re: Unit Threaded - a unit testing library for D

2013-08-27 Thread Meta
On Tuesday, 27 August 2013 at 13:07:02 UTC, Atila Neves wrote: I cannot tell you how handy this will be. I've got a couple of projects that badly need this as is, and I can see myself using it for all future projects of any notable size.

Re: Unit Threaded - a unit testing library for D

2013-08-27 Thread Andrej Mitrovic
On 8/27/13, Tobias Pankrath tob...@pankrath.net wrote: If all tests pass, great. If one fails, it's hard to know why. Quoting you but responding to OP: There was a pull I made to make assert print out some more info on failure, but it never passed the test-suite. Pull:

Re: Unit Threaded - a unit testing library for D

2013-08-27 Thread Atila Neves
I haven't had a problem with compile times. Ideally the test code should be small and well-separated into modules so I'm not too worried about that (the compile-time scanning only happens on the test modules). As for the registration, it was one of my goals to not have to do any. You could

Re: Unit Threaded - a unit testing library for D

2013-08-27 Thread Dicebot
On Tuesday, 27 August 2013 at 15:42:28 UTC, Andrej Mitrovic wrote: getUnitTests should help here, although it's still based on compile-time introspection just like your library. I guess if nothing else, this trait will make your library implementation simpler. :) By the, way, can we

Re: Unit Threaded - a unit testing library for D

2013-08-27 Thread Andrej Mitrovic
On 8/27/13, Dicebot pub...@dicebot.lv wrote: By the way, can we currently in 2.064 attach UDA's to unittest blocks? Yes. E.g.: - alias Seq(T...) = T; struct RunTest { } struct SkipTest { } @RunTest unittest { } @SkipTest unittest { } void main() { alias Tests =

Re: Unit Threaded - a unit testing library for D

2013-08-27 Thread Jacob Carlborg
On 2013-08-27 18:59, Dicebot wrote: By the, way, can we currently in 2.064 attach UDA's to unittest blocks? Together with getUnitTest that will allow to have same test code base that acts in both old-school mode and gets used by some fancy introspection library. Yes, and unit tests for CTFE:

Re: Unit Threaded - a unit testing library for D

2013-08-27 Thread Nick Sabalausky
On Tue, 27 Aug 2013 17:42:19 +0200 Andrej Mitrovic andrej.mitrov...@gmail.com wrote: The only tool is assert, and you have to write your own assert messages (no assertEqual, assertNull, etc.) Currently we have assertThrown/assertNotThrown, but assertEqual and friends are easy to

Re: Unit Threaded - a unit testing library for D

2013-08-27 Thread linkrope
On Tuesday, 27 August 2013 at 15:42:28 UTC, Andrej Mitrovic wrote: I have some of these functions here: https://github.com/AndrejMitrovic/minilib/blob/master/src/minilib/core/test.d Where is your 'assertOp' from the comments of issue 4653? I recently added it to

Re: Unit Threaded - a unit testing library for D

2013-08-27 Thread Andrej Mitrovic
On 8/28/13, linkrope linkr...@github.com wrote: On Tuesday, 27 August 2013 at 15:42:28 UTC, Andrej Mitrovic wrote: I have some of these functions here: https://github.com/AndrejMitrovic/minilib/blob/master/src/minilib/core/test.d Where is your 'assertOp' from the comments of issue 4653? I

Re: Unit Threaded - a unit testing library for D

2013-08-27 Thread Russel Winder
On Tue, 2013-08-27 at 15:07 +0200, Atila Neves wrote: My very first D project is now feature-complete as far as I can see (alpha) and I'd like to share it with the community: https://github.com/atilaneves/unit-threaded There are more details on github but here are the highlights: The