-
Notifications
You must be signed in to change notification settings - Fork 12
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
Support expected output in compile-time failure test #1
Comments
I think this can be accomplished with the |
I don't think it works (I remember trying this first), and it's convenient to put the error message in the source file, close to the line where the error happens. If you don't put any message, it just checks for failure. |
That looks like what you do in the link you sent.
Yea, I can add option to parse the output from the source file. |
Sure, but there I don't say |
I actually don't see it as backwards. However, I do see it very useful to add a feature to parse this from the source files. |
For example, I want to be able to check that a specific error message is emitted (a
static_assert
, say). The way I do that right now is by putting the following in the source file:I then create a
compile_fail
test forfoo.cpp
and that checks whether there's an expected message. See https://github.com/ldionne/dyno/blob/master/cmake/CompileFailTest.cmake for an implementation.The text was updated successfully, but these errors were encountered: