mirror of
https://github.com/logos-co/logos-package-manager.git
synced 2026-08-27 10:11:07 +00:00
* 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>
17 lines
404 B
C++
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;
|
|
};
|