diff options
author | Sven Gothel <[email protected]> | 2021-11-16 14:22:19 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-11-16 14:22:19 +0100 |
commit | f911176c28dfd7ac858a142899c267d8c6e0fdff (patch) | |
tree | 6621ef2baf5c3b312cff1c86de36a2d195839e2e /test | |
parent | a45d43217b35b099a56f8ac95fc6e467f21fdaf4 (diff) |
TestLatch01: Add validation against external artifact
Diffstat (limited to 'test')
-rw-r--r-- | test/test_latch01.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/test_latch01.cpp b/test/test_latch01.cpp index 10f3180..0edaae5 100644 --- a/test/test_latch01.cpp +++ b/test/test_latch01.cpp @@ -38,10 +38,13 @@ using namespace jau; class TestLatch01 { - private: - void something(jau::latch& l) { - l.count_down(); - } + private: + jau::relaxed_atomic_int my_counter = 0; + + void something(jau::latch& l) { + my_counter = my_counter + 1; + l.count_down(); + } public: @@ -59,6 +62,7 @@ class TestLatch01 { completion.arrive_and_wait(); REQUIRE_MSG("zero", 0 == completion.value()); + REQUIRE_MSG("8", count == my_counter); for(size_t i=0; i<count; i++) { if( tasks[i].joinable() ) { |