Files
Dario LipicarandClaude Opus 4.8 e52e7d6eb1 improved logging for mismatched variants (#16)
* improved logging for mismatched variants

* Use host library extension in createPackageWithVariant test helper

Addresses PR review: match the platform-conditional .dylib/.dll/.so
extension used by createUnsignedPackage instead of hard-coding .so, so
the test fixture's LGX layout matches host expectations on all platforms.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 10:55:41 -03:00

17 lines
404 B
C++

#pragma once
#include <iostream>
#include <sstream>
#include <string>
// RAII capture of std::cerr so tests can assert on emitted warning lines.
class CerrCapture {
public:
CerrCapture() : m_old(std::cerr.rdbuf(m_buf.rdbuf())) {}
~CerrCapture() { std::cerr.rdbuf(m_old); }
std::string str() const { return m_buf.str(); }
private:
std::ostringstream m_buf;
std::streambuf* m_old;
};