lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Customizing warning handling in tests?


From: Vadim Zeitlin
Subject: [lmi] Customizing warning handling in tests?
Date: Mon, 22 Feb 2016 19:14:53 +0100

 Hello,

 Now that the code parsing tables can generate warnings, I'd like to test
that the expected warnings are generated and, also, ensure the warnings are
not actually output to standard output while the test is running to avoid
confusion.

 Unfortunately it doesn't seem possible to customize the warning alert
function to do what I want, i.e. to collect the warnings in a string in
order to compare them to the expected ones later. This looks like a very
unfortunate limitation to me, why have all this flexible alert functions
mechanism only to not allow changing them?

 I can work around this by redirecting std::cout instead using the usual
rdbuf() trick, but this seems like a wrong level for solving this problem.
Could we add a possibility to set up a custom warning alert function
instead?

 Thanks,
VZ

reply via email to

[Prev in Thread] Current Thread [Next in Thread]