Skip to content
Snippets Groups Projects
Commit 9b9f12d8 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

tests: accept null token if callback returns false

parent 26ad6de3
Branches
No related tags found
No related merge requests found
...@@ -119,17 +119,16 @@ DhtRunnerTester::testListen() { ...@@ -119,17 +119,16 @@ DhtRunnerTester::testListen() {
CPPUNIT_ASSERT(ftokenc.valid()); CPPUNIT_ASSERT(ftokenc.valid());
auto tokena = ftokena.get(); auto tokena = ftokena.get();
auto tokenb = ftokenb.get();
auto tokenc = ftokenc.get(); auto tokenc = ftokenc.get();
// tokenb might be 0 since the callback returns false.
CPPUNIT_ASSERT(tokena); CPPUNIT_ASSERT(tokena);
CPPUNIT_ASSERT(tokenb);
CPPUNIT_ASSERT(tokenc); CPPUNIT_ASSERT(tokenc);
CPPUNIT_ASSERT_EQUAL(N + 1u, valueCount.load()); CPPUNIT_ASSERT_EQUAL(N + 1u, valueCount.load());
node1.cancelListen(a, tokena); node1.cancelListen(a, tokena);
node1.cancelListen(b, tokena); node1.cancelListen(b, std::move(ftokenb));
node1.cancelListen(c, tokena); node1.cancelListen(c, tokenc);
} }
} // namespace test } // namespace test
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment