From b0f8b28977e59b7fbfc1ce57ee5c102b8e4e0690 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 12 Feb 2023 11:54:05 +0100 Subject: Touch documents on read (i.e. reset timeout on read) --- tests/test-connectionregistry.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/test-connectionregistry.cpp') diff --git a/tests/test-connectionregistry.cpp b/tests/test-connectionregistry.cpp index 282f397..dbc2b7e 100644 --- a/tests/test-connectionregistry.cpp +++ b/tests/test-connectionregistry.cpp @@ -114,14 +114,17 @@ TEST_F(ConnectionRegistryTest, test_iterators) EXPECT_THROW(cr.begin(""), std::exception); EXPECT_THROW(cr.end(""), std::exception); + EXPECT_EQ(std::distance(cr.begin(), cr.end()), 0); cr.addConnection(c); EXPECT_THROW(cr.begin(""), std::exception); EXPECT_THROW(cr.end(""), std::exception); + EXPECT_EQ(std::distance(cr.begin(), cr.end()), 1); cr.setId(c, "id1"); EXPECT_EQ(std::distance(cr.begin("id1"), cr.end("id1")), 1); + EXPECT_EQ(std::distance(cr.begin(), cr.end()), 1); } TEST_F(ConnectionRegistryTest, test_guard) -- cgit v1.2.3