aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/unittests/parallel-for-selftests.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/unittests/parallel-for-selftests.c b/gdb/unittests/parallel-for-selftests.c
index e0c07e5..8a86b43 100644
--- a/gdb/unittests/parallel-for-selftests.c
+++ b/gdb/unittests/parallel-for-selftests.c
@@ -60,6 +60,14 @@ test (int n_threads)
SELF_CHECK (counter == NUMBER);
+ counter = 0;
+ gdb::parallel_for_each (1, 0, 0,
+ [&] (int start, int end)
+ {
+ counter += end - start;
+ });
+ SELF_CHECK (counter == 0);
+
#undef NUMBER
}