On 2010-11-28 01:17, Jonathan M Davis wrote:
On Saturday 27 November 2010 15:30:23 Jacob Carlborg wrote:
On 2010-11-27 21:36, Jonathan M Davis wrote:
On Saturday 27 November 2010 09:00:36 Jacob Carlborg wrote:
On 2010-11-26 09:10, Jonathan M Davis wrote:
Any more feedback on my potential
On 2010-11-26 09:10, Jonathan M Davis wrote:
Any more feedback on my potential std.unittests, or is looking good overall? I
definitely think that it's better than when I first posted it, so the feedback
thus far has definitely been helpful, and I do find these functions extremely
useful in my
On Saturday 27 November 2010 09:00:36 Jacob Carlborg wrote:
On 2010-11-26 09:10, Jonathan M Davis wrote:
Any more feedback on my potential std.unittests, or is looking good
overall? I definitely think that it's better than when I first posted
it, so the feedback thus far has definitely been
On 2010-11-27 21:36, Jonathan M Davis wrote:
On Saturday 27 November 2010 09:00:36 Jacob Carlborg wrote:
On 2010-11-26 09:10, Jonathan M Davis wrote:
Any more feedback on my potential std.unittests, or is looking good
overall? I definitely think that it's better than when I first posted
it, so
On Saturday 27 November 2010 15:30:23 Jacob Carlborg wrote:
On 2010-11-27 21:36, Jonathan M Davis wrote:
On Saturday 27 November 2010 09:00:36 Jacob Carlborg wrote:
On 2010-11-26 09:10, Jonathan M Davis wrote:
Any more feedback on my potential std.unittests, or is looking good
overall? I
Most recent code: http://is.gd/hO8HP
Per the suggestions in this thread, I changed the string mixin templates to
functions using lazy. I also added assertOpBinary and made assertOpOpAssign()
call opOpAssign() directly. Finally, I made assertEqual() and assertNotEqual()
templatized on a
On 2010-11-21 01:23, Jonathan M Davis wrote:
On Saturday 20 November 2010 08:03:52 Jacob Carlborg wrote:
Why don't you use delegates instead of string mixins? For example,
assertExcThrown, could take a delegate which calls the function you want
to test instead of a string that represents the
On 2010-11-21 02:34, Jonathan M Davis wrote:
On Saturday 20 November 2010 16:23:32 Jonathan M Davis wrote:
The lazy solution sounds pretty good actually. Can anyone think of any real
downsides to that? So, it would look something like
assertExcThrown(E : Throwable, T)(lazy T, string file =
On Sunday 21 November 2010 04:19:51 Jacob Carlborg wrote:
On 2010-11-21 02:34, Jonathan M Davis wrote:
On Saturday 20 November 2010 16:23:32 Jonathan M Davis wrote:
The lazy solution sounds pretty good actually. Can anyone think of any
real downsides to that? So, it would look something
On 2010-11-21 14:06, Jonathan M Davis wrote:
On Sunday 21 November 2010 04:19:51 Jacob Carlborg wrote:
On 2010-11-21 02:34, Jonathan M Davis wrote:
On Saturday 20 November 2010 16:23:32 Jonathan M Davis wrote:
The lazy solution sounds pretty good actually. Can anyone think of any
real
On Sunday 21 November 2010 05:44:15 Jacob Carlborg wrote:
I don't know if the compiler can inline delegates or not but if it can I
think this case would be very easy for the compiler to inline the delegate.
It can't. That's one of the big issues with enforce. At the moment, it actually
makes
Jonathan M Davis wrote:
On Saturday 20 November 2010 10:16:55 Lutger Blijdestijn wrote:
I'm not particularly fond of this interface and think that a solution
with a delegate / lazy or alias template parameter would be more
convenient. However, until we have ast macros I do see the added value
Jacob Carlborg wrote:
On 2010-11-21 01:23, Jonathan M Davis wrote:
On Saturday 20 November 2010 08:03:52 Jacob Carlborg wrote:
Why don't you use delegates instead of string mixins? For example,
assertExcThrown, could take a delegate which calls the function you want
to test instead of a
On 2010-11-21 17:20, Lutger Blijdestijn wrote:
Jacob Carlborg wrote:
On 2010-11-21 01:23, Jonathan M Davis wrote:
On Saturday 20 November 2010 08:03:52 Jacob Carlborg wrote:
Why don't you use delegates instead of string mixins? For example,
assertExcThrown, could take a delegate which calls
On Sunday 21 November 2010 08:11:06 Lutger Blijdestijn wrote:
Jonathan M Davis wrote:
On Saturday 20 November 2010 10:16:55 Lutger Blijdestijn wrote:
I'm not particularly fond of this interface and think that a solution
with a delegate / lazy or alias template parameter would be more
On 19-nov-10, at 23:44, Sean Kelly wrote:
Leandro Lucarella Wrote:
Sean Kelly, el 19 de noviembre a las 14:59 me escribiste:
This should work:
void func(string x = __FILE__, T...)(T args);
D allows defaulted template arguments to occur before non-
defaulted ones.
I wasn't aware that
On 2010-11-19 19:16, Jonathan M Davis wrote:
Updated code: http://is.gd/hqPb2
Okay. As mentioned before, I have helper unit test functions which I use heavily
in std.datetime and which are pretty much going to have to either end up as
private helper functions in std.datetime or actually get
I'm not particularly fond of this interface and think that a solution with a
delegate / lazy or alias template parameter would be more convenient.
However, until we have ast macros I do see the added value in this approach.
Some remarks about the api, not a proper review of the code itself:
-
What about debug vs release compilation for this new module?
We know we have assert for debug mode, and enforce for release mode
(except the special assert false case). If I want assertExcThrown to
be compiled in release mode it seems I'd need an enforced version of
it, possibly called
On Saturday 20 November 2010 08:03:52 Jacob Carlborg wrote:
Why don't you use delegates instead of string mixins? For example,
assertExcThrown, could take a delegate which calls the function you want
to test instead of a string that represents the call. The mixin want be
needed as well. Am I
On Saturday 20 November 2010 10:16:55 Lutger Blijdestijn wrote:
I'm not particularly fond of this interface and think that a solution with
a delegate / lazy or alias template parameter would be more convenient.
However, until we have ast macros I do see the added value in this
approach.
On Saturday 20 November 2010 10:23:36 Andrej Mitrovic wrote:
What about debug vs release compilation for this new module?
We know we have assert for debug mode, and enforce for release mode
(except the special assert false case). If I want assertExcThrown to
be compiled in release mode it
On Saturday 20 November 2010 16:23:32 Jonathan M Davis wrote:
The lazy solution sounds pretty good actually. Can anyone think of any real
downsides to that? So, it would look something like
assertExcThrown(E : Throwable, T)(lazy T, string file = __FILE__, size_t
line = __LINE__);
Wait. No.
Updated code: http://is.gd/hqPb2
Okay. As mentioned before, I have helper unit test functions which I use
heavily
in std.datetime and which are pretty much going to have to either end up as
private helper functions in std.datetime or actually get added in a separate
module for everyone to use
Jonathan M Davis Wrote:
In particular, needing to pass LineInfo() to assertExcThrown!() to know the
file
and line number was disliked (though it was by far the best solution that I'd
been able to come up with).
Not sure if this helps, but if you default-initialize template function
On Friday, November 19, 2010 11:37:16 Sean Kelly wrote:
Jonathan M Davis Wrote:
In particular, needing to pass LineInfo() to assertExcThrown!() to know
the file and line number was disliked (though it was by far the best
solution that I'd been able to come up with).
Not sure if this
Jonathan M Davis Wrote:
On Friday, November 19, 2010 11:37:16 Sean Kelly wrote:
Jonathan M Davis Wrote:
In particular, needing to pass LineInfo() to assertExcThrown!() to know
the file and line number was disliked (though it was by far the best
solution that I'd been able to come up
On Friday 19 November 2010 11:59:18 Sean Kelly wrote:
Jonathan M Davis Wrote:
On Friday, November 19, 2010 11:37:16 Sean Kelly wrote:
Jonathan M Davis Wrote:
In particular, needing to pass LineInfo() to assertExcThrown!() to
know the file and line number was disliked (though it was
Sean Kelly, el 19 de noviembre a las 14:59 me escribiste:
Jonathan M Davis Wrote:
On Friday, November 19, 2010 11:37:16 Sean Kelly wrote:
Jonathan M Davis Wrote:
In particular, needing to pass LineInfo() to assertExcThrown!() to know
the file and line number was disliked (though it
On Friday 19 November 2010 12:39:20 Leandro Lucarella wrote:
Sean Kelly, el 19 de noviembre a las 14:59 me escribiste:
Jonathan M Davis Wrote:
On Friday, November 19, 2010 11:37:16 Sean Kelly wrote:
Jonathan M Davis Wrote:
In particular, needing to pass LineInfo() to
Leandro Lucarella Wrote:
Sean Kelly, el 19 de noviembre a las 14:59 me escribiste:
This should work:
void func(string x = __FILE__, T...)(T args);
D allows defaulted template arguments to occur before non-defaulted ones.
And what is func!(blah)(); is supposed to do, make x =
Jonathan M Davis, el 19 de noviembre a las 13:24 me escribiste:
On Friday 19 November 2010 12:39:20 Leandro Lucarella wrote:
Sean Kelly, el 19 de noviembre a las 14:59 me escribiste:
Jonathan M Davis Wrote:
On Friday, November 19, 2010 11:37:16 Sean Kelly wrote:
Jonathan M Davis
32 matches
Mail list logo