mirror of https://github.com/KLayout/klayout.git
Small enhancement: unit tests work also with verbosity >0 now.
This commit is contained in:
parent
a46cd305c6
commit
25d1a65b21
|
|
@ -146,6 +146,15 @@ CaptureChannel::CaptureChannel ()
|
|||
tl::info.add (this, false);
|
||||
tl::error.add (this, false);
|
||||
tl::warn.add (this, false);
|
||||
|
||||
// Because we don't want to capture logger messages, we switch verbosity to "silent" during capturing
|
||||
m_saved_verbosity = tl::verbosity ();
|
||||
tl::verbosity (0);
|
||||
}
|
||||
|
||||
CaptureChannel::~CaptureChannel ()
|
||||
{
|
||||
tl::verbosity (m_saved_verbosity);
|
||||
}
|
||||
|
||||
void CaptureChannel::puts (const char *s)
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ class TL_PUBLIC CaptureChannel : public tl::Channel
|
|||
{
|
||||
public:
|
||||
CaptureChannel ();
|
||||
~CaptureChannel ();
|
||||
|
||||
std::string captured_text () const
|
||||
{
|
||||
|
|
@ -210,6 +211,7 @@ protected:
|
|||
|
||||
private:
|
||||
std::ostringstream m_text;
|
||||
int m_saved_verbosity;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue