From 0ae675239d4df82e2bde5f5018806f5b5ba17263 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 5 Oct 2023 01:50:54 +0200 Subject: [PATCH] Library/Application: switch BusTerm_test --- src/lib/diff/mutation-message.hpp | 2 +- tests/stage/bus-term-test.cpp | 39 +++++++++++++++++-------------- wiki/thinkPad.ichthyo.mm | 4 +++- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/lib/diff/mutation-message.hpp b/src/lib/diff/mutation-message.hpp index b5aed6736..049e25695 100644 --- a/src/lib/diff/mutation-message.hpp +++ b/src/lib/diff/mutation-message.hpp @@ -120,7 +120,7 @@ namespace diff{ /** * Opaque message to effect a structural change on a target, which is * likewise only known in an abstract way, as being specifically structured. - * Sending such messages typically allows some _implemention defined_ part within + * Sending such messages typically allows some _implementation defined_ part within * the Session to communicate structure and content to some other _implementation defined_ * part within the UI-Layer, without the necessity of both partners to be tightly coupled on * implementation level or even know much about the other's implementation details. As motivation, diff --git a/tests/stage/bus-term-test.cpp b/tests/stage/bus-term-test.cpp index 9732d7722..038833f23 100644 --- a/tests/stage/bus-term-test.cpp +++ b/tests/stage/bus-term-test.cpp @@ -27,9 +27,9 @@ #include "lib/test/run.hpp" #include "lib/test/test-helper.hpp" +#include "lib/thread.hpp" #include "lib/sync.hpp" #include "lib/sync-classlock.hpp" -#include "vault/thread-wrapper.hpp" #include "include/ui-protocol.hpp" #include "stage/ctrl/bus-term.hpp" #include "stage/ctrl/state-manager.hpp" @@ -54,7 +54,7 @@ using boost::lexical_cast; using lib::Sync; using lib::ClassLock; -using vault::ThreadJoinable; +using lib::ThreadJoinable; using lib::iter_stl::dischargeToSnapshot; using lib::IterQueue; using lib::IterStack; @@ -546,10 +546,10 @@ namespace test { /** - * @test integration test of mutation by diff message + * @test integration test of mutation by diff message. * Since this test focuses on the bus side of standard interactions, - * it seems indicated to emulate the complete invocation situation, - * which involves passing thread boundraries. The main thread running + * it seems indicated to simulate the complete invocation situation, + * which involves passing thread boundaries. The main thread running * this test shall enact the role of the UI event thread (since the * UI-Bus in the real application is confined to this UI thread). * Thus we'll start another thread to enact the role of the Session, @@ -566,7 +566,7 @@ namespace test { struct SessionThread : Sync<> - , ThreadJoinable + , ThreadJoinable<> { // shared data uint64_t borgChecksum_ = 0; @@ -663,21 +663,22 @@ namespace test { /** - * launch the Session Thread and start injecting Borg + * launch the Session Thread and start injecting Borgs */ SessionThread(function notifyGUI) : ThreadJoinable{"BusTerm_test: asynchronous diff mutation" - , [=]() { - uint cnt = rand() % MAX_RAND_BORGS; - for (uint i=0; i - + + +