linkrope / dunit

xUnit Testing Framework for D
Boost Software License 1.0
37 stars 9 forks source link

Assert Messages with printf style formatting #2

Closed burner closed 10 years ago

burner commented 11 years ago

For easier more outspoken error messages asserts now have printf style formatting. This pull request also removes some symmetric code paths.

Old api has not changed

linkrope commented 11 years ago

What about "template bloat"? A D.learn post explains that file and line should better not be template parameters: http://forum.dlang.org/post/sgoopujyxkpphfyrmwxj@forum.dlang.org

What's so bad about "print%c style formatting".format('c')?

burner commented 11 years ago

IMHO not really a problem as these functions are quite small. because typing wastes times and format is a template function anyway so you have template bloat one way or the other, sure a bit more this way but with less typing and less space wasted