[test] compile-fail tests with precise output
I would like to create tests that check, not only that a file will not compile, but that the errors contain specific strings. More precisely, I want to make sure that wrong code fails on a MPL assertion and not deep inside the template instantiations. Is that feasible? Thanks, Jean-Louis
AMDG Jean-Louis Leroy wrote:
I would like to create tests that check, not only that a file will not compile, but that the errors contain specific strings. More precisely, I want to make sure that wrong code fails on a MPL assertion and not deep inside the template instantiations.
Is that feasible?
Currently, there is no way to do this. I don't know of a way to capture the output of the compiler. In Christ, Steven Watanabe
Jean-Louis Leroy wrote:
I would like to create tests that check, not only that a file will not compile, but that the errors contain specific strings. More precisely, I want to make sure that wrong code fails on a MPL assertion and not deep inside the template instantiations.
Is that feasible?
I guess you can somehow execute system call from inside test application and compare it's output to the expected one. Gennadiy
participants (3)
-
Gennadiy Rozental -
Jean-Louis Leroy -
Steven Watanabe