[Top][All Lists]

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

Re: [lmi] Customizing warning handling in tests?

From: Greg Chicares
Subject: Re: [lmi] Customizing warning handling in tests?
Date: Tue, 23 Feb 2016 02:05:38 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

On 2016-02-22 18:14, Vadim Zeitlin wrote:
>  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?

This is stable code that's used broadly throughout lmi. Any change here risks
destabilizing production. I don't see the benefits as justifying the risks,
and I don't think I can find time to review such a change.

reply via email to

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