Compare commits
2 commits
6e838afbab
...
963032617e
| Author | SHA1 | Date | |
|---|---|---|---|
| 963032617e | |||
| 55d68e3b71 |
2 changed files with 5 additions and 7 deletions
|
|
@ -6,9 +6,6 @@
|
||||||
using namespace lt;
|
using namespace lt;
|
||||||
using std::ignore;
|
using std::ignore;
|
||||||
using test::Case;
|
using test::Case;
|
||||||
using test::expect_eq;
|
|
||||||
using test::expect_ne;
|
|
||||||
using test::expect_not_nullptr;
|
|
||||||
using test::expect_throw;
|
using test::expect_throw;
|
||||||
using test::expect_true;
|
using test::expect_true;
|
||||||
using test::Suite;
|
using test::Suite;
|
||||||
|
|
@ -75,7 +72,7 @@ struct RendererContext
|
||||||
|
|
||||||
Suite raii = [] {
|
Suite raii = [] {
|
||||||
Case { "happy path won't throw" } = [&] {
|
Case { "happy path won't throw" } = [&] {
|
||||||
std::ignore = create_system();
|
ignore = create_system();
|
||||||
};
|
};
|
||||||
|
|
||||||
Case { "happy path has no validation errors" } = [&] {
|
Case { "happy path has no validation errors" } = [&] {
|
||||||
|
|
@ -91,7 +88,7 @@ Suite raii = [] {
|
||||||
auto stats = create_ref<app::SystemStats>();
|
auto stats = create_ref<app::SystemStats>();
|
||||||
|
|
||||||
expect_throw([&] {
|
expect_throw([&] {
|
||||||
std::ignore = System(
|
ignore = System(
|
||||||
{
|
{
|
||||||
.registry = {},
|
.registry = {},
|
||||||
.surface_entity = surface_entity,
|
.surface_entity = surface_entity,
|
||||||
|
|
@ -101,7 +98,7 @@ Suite raii = [] {
|
||||||
});
|
});
|
||||||
|
|
||||||
expect_throw([&] {
|
expect_throw([&] {
|
||||||
std::ignore = System(
|
ignore = System(
|
||||||
System::CreateInfo {
|
System::CreateInfo {
|
||||||
.registry = surface_entity.get_registry(),
|
.registry = surface_entity.get_registry(),
|
||||||
.surface_entity = empty_entity,
|
.surface_entity = empty_entity,
|
||||||
|
|
@ -111,7 +108,7 @@ Suite raii = [] {
|
||||||
});
|
});
|
||||||
|
|
||||||
expect_throw([&] {
|
expect_throw([&] {
|
||||||
std::ignore = System(
|
ignore = System(
|
||||||
System::CreateInfo {
|
System::CreateInfo {
|
||||||
.registry = surface_entity.get_registry(),
|
.registry = surface_entity.get_registry(),
|
||||||
.surface_entity = surface_entity,
|
.surface_entity = surface_entity,
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@ void System::on_surface_construct(ecs::Registry ®istry, ecs::EntityId entity)
|
||||||
ensure(display_env != nullptr, "DISPLAY env var not found!");
|
ensure(display_env != nullptr, "DISPLAY env var not found!");
|
||||||
|
|
||||||
auto *display = XOpenDisplay(display_env);
|
auto *display = XOpenDisplay(display_env);
|
||||||
|
ensure(display, "Failed to open XDisplay with DISPLAY: {}", display_env);
|
||||||
|
|
||||||
auto root_window = XDefaultRootWindow(display);
|
auto root_window = XDefaultRootWindow(display);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue