From d490abd53c59df61afaf19ebf88e73ae6b5c23d6 Mon Sep 17 00:00:00 2001 From: Frank Osterfeld Date: Wed, 21 Feb 2024 21:57:50 +0100 Subject: [PATCH] Update to latest graph-prototype --- CMakeLists.txt | 2 +- blocklib/picoscope/test/qa_Picoscope4000a.cc | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68b7331..8c7b028 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ set(ENABLE_TESTING OFF) FetchContent_Declare( graph-prototype GIT_REPOSITORY https://github.com/fair-acc/graph-prototype.git - GIT_TAG ed9738d809d4f89ddbbee49fd9a3bbd87c27bfab # main as of 2024-02-20 + GIT_TAG 7f22e217e88ef54fe45ece84f804f6de8b7ff989 # main as of 2024-02-22 ) FetchContent_Declare( diff --git a/blocklib/picoscope/test/qa_Picoscope4000a.cc b/blocklib/picoscope/test/qa_Picoscope4000a.cc index 61aec7b..0a50dab 100644 --- a/blocklib/picoscope/test/qa_Picoscope4000a.cc +++ b/blocklib/picoscope/test/qa_Picoscope4000a.cc @@ -77,10 +77,10 @@ testStreamingBasics() { expect(nothrow([&ps] { ps.start(); })); scheduler::Simple sched{ std::move(flowGraph) }; - sched.init(); - sched.start(); + expect(sched.changeStateTo(lifecycle::State::INITIALISED).has_value()); + expect(sched.changeStateTo(lifecycle::State::RUNNING).has_value()); std::this_thread::sleep_for(kDuration); - sched.stop(); + expect(sched.changeStateTo(lifecycle::State::REQUESTED_STOP).has_value()); const auto measuredRate = static_cast(sink.samples_seen) / duration(kDuration).count(); fmt::println("Produced in worker: {}", ps.producedWorker()); @@ -186,10 +186,10 @@ const boost::ut::suite Picoscope4000aTests = [] { expect(eq(ConnectionResult::SUCCESS, flowGraph.connect<"analog_out", 0>(ps).to<"in">(sink0))); scheduler::Simple sched{ std::move(flowGraph) }; - sched.init(); - sched.start(); + expect(sched.changeStateTo(lifecycle::State::INITIALISED).has_value()); + expect(sched.changeStateTo(lifecycle::State::RUNNING).has_value()); std::this_thread::sleep_for(std::chrono::seconds(3)); - sched.stop(); + expect(sched.changeStateTo(lifecycle::State::REQUESTED_STOP).has_value()); expect(ge(sink0.samples_seen, std::size_t{ 2000 })); expect(le(sink0.samples_seen, std::size_t{ 10000 }));