MCPcopy Create free account
hub / github.com/apache/mesos / TEST

Function TEST

3rdparty/libprocess/src/tests/loop_tests.cpp:34–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33
34TEST(LoopTest, Sync)
35{
36 std::atomic_int value = ATOMIC_VAR_INIT(1);
37
38 Future<Nothing> future = loop(
39 [&]() {
40 return value.load();
41 },
42 [](int i) -> ControlFlow<Nothing> {
43 if (i != 0) {
44 return Continue();
45 }
46 return Break();
47 });
48
49 EXPECT_TRUE(future.isPending());
50
51 value.store(0);
52
53 AWAIT_READY(future);
54}
55
56
57TEST(LoopTest, Async)

Callers

nothing calls this directly

Calls 13

loopFunction · 0.85
hasDiscardMethod · 0.80
storeMethod · 0.65
ContinueClass · 0.50
BreakFunction · 0.50
loadMethod · 0.45
isPendingMethod · 0.45
getMethod · 0.45
setMethod · 0.45
thenMethod · 0.45
futureMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected