Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert Messages with printf style formatting #2

Closed
wants to merge 5 commits into from

Conversation

burner
Copy link

@burner burner commented May 9, 2013

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

burner added 5 commits May 3, 2013 19:40
…sage

I cleaned up some semetric impls like assertSame and assertNotSame to use the
same underlaying impl as well. I also added unittest to for all changes.
The preexisting api did not change.
@linkrope
Copy link
Owner

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

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

@burner
Copy link
Author

burner commented May 13, 2013

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

@burner burner closed this Nov 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants