mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
tests/cpp11_condition_variable: fix NDEBUG compile problem
This commit is contained in:
parent
f4224890ae
commit
08706e771e
@ -20,7 +20,6 @@
|
||||
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <system_error>
|
||||
|
||||
#include "riot/mutex.hpp"
|
||||
@ -28,6 +27,8 @@
|
||||
#include "riot/thread.hpp"
|
||||
#include "riot/condition_variable.hpp"
|
||||
|
||||
#include "test_utils/expect.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace riot;
|
||||
|
||||
@ -62,7 +63,7 @@ int main() {
|
||||
cv.wait(lk, [&processed] { return processed; });
|
||||
}
|
||||
string expected = "Example data after processing";
|
||||
assert(data == expected);
|
||||
expect(data == expected);
|
||||
worker.join();
|
||||
}
|
||||
puts("Done\n");
|
||||
@ -102,7 +103,7 @@ int main() {
|
||||
cv.wait_for(lk, chrono::seconds(timeout));
|
||||
xtimer_now_timex(&after);
|
||||
auto diff = timex_sub(after, before);
|
||||
assert(diff.seconds >= timeout);
|
||||
expect(diff.seconds >= timeout);
|
||||
}
|
||||
puts("Done\n");
|
||||
|
||||
@ -119,7 +120,7 @@ int main() {
|
||||
cv.wait_until(lk, time);
|
||||
xtimer_now_timex(&after);
|
||||
auto diff = timex_sub(after, before);
|
||||
assert(diff.seconds >= timeout);
|
||||
expect(diff.seconds >= timeout);
|
||||
}
|
||||
puts("Done\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user