Skip to content
Snippets Groups Projects
Commit c73a91ab authored by Philip Trettner's avatar Philip Trettner
Browse files

test logging

parent bcd4a6c0
No related branches found
No related tags found
No related merge requests found
#include <doctest.hh>
#include <sstream>
#include <glow/common/log.hh>
#include <glm/ext.hpp>
#include <tg/typed-geometry-std.hh>
namespace
{
struct Foo1
{
};
std::ostream& operator<<(std::ostream& os, Foo1 const&)
{
return os;
}
struct Foo2
{
};
std::string to_string(Foo2 const&)
{
return "";
}
}
TEST_CASE("glow::log usages")
{
std::stringstream ss;
glow::setLogStream(&ss, &ss);
glow::info() << 0;
glow::info() << "hello world";
glow::info() << glm::vec3();
glow::info() << glm::mat4();
glow::info() << tg::pos3();
glow::info() << tg::mat4();
glow::info() << std::string("hello world");
glow::info() << Foo1();
glow::info() << Foo2();
ss << Foo1() << to_string(Foo2()); // to silence warning
glow::setLogStream(nullptr, nullptr);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment