From e5bf2f231e5ebaa13baf0742149d71fc8777e823 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sun, 21 Jul 2024 22:42:22 +0200 Subject: Added preallocation to remote --- modules/remote/tests/remote_loopback.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules/remote/tests') diff --git a/modules/remote/tests/remote_loopback.cpp b/modules/remote/tests/remote_loopback.cpp index 2895ee7..e78f646 100644 --- a/modules/remote/tests/remote_loopback.cpp +++ b/modules/remote/tests/remote_loopback.cpp @@ -69,5 +69,18 @@ SAW_TEST("Remote Loopback Data"){ auto eov = conv.take(); SAW_EXPECT(!eov.is_value(), "Failed receive. Value should already be erased."); } + + id alloc_id = [&](){ + auto eov = client.allocate(data{}); + SAW_EXPECT(eov.is_value(), "Failed send."); + return eov.get_value(); + }(); + { + auto eov = client.find(alloc_id); + SAW_EXPECT(eov.is_value(), "Failed find."); + auto& f_val = eov.get_value(); + SAW_EXPECT(f_val, "Nullptr in find."); + f_val->set(5u); + } } } -- cgit v1.2.3