aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/indicator-fixture.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/indicator-fixture.h b/tests/indicator-fixture.h
index e16d254..c269be5 100644
--- a/tests/indicator-fixture.h
+++ b/tests/indicator-fixture.h
@@ -36,6 +36,7 @@ class IndicatorFixture : public ::testing::Test
protected:
std::chrono::milliseconds _eventuallyTime;
+ private:
class PerRunData {
public:
/* We're private in the fixture but other than that we don't care,
@@ -209,9 +210,8 @@ class IndicatorFixture : public ::testing::Test
/* The core of the idle function as an object so we can use the C++-isms
of attaching the variables and make this code reasonably readable */
- auto idlefunc = [&loop, &retpromise, &testfunc, &start, this]() -> void {
+ std::function<void(void)> idlefunc = [&loop, &retpromise, &testfunc, &start, this]() -> void {
auto result = testfunc();
- g_debug("Idle Ran");
if (result == false && _eventuallyTime > (std::chrono::steady_clock::now() - start)) {
return;
@@ -221,12 +221,6 @@ class IndicatorFixture : public ::testing::Test
g_main_loop_quit(loop.get());
};
- /* Run once to see if we can avoid waiting */
- idlefunc();
- if (retfuture.valid()) {
- return retfuture.get();
- }
-
auto idlesrc = g_idle_add([](gpointer data) -> gboolean {
auto func = reinterpret_cast<std::function<void(void)> *>(data);
(*func)();