From 6c339d8aab380a191fe3fce7ca7dc7c09e252ebd Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 1 Jan 2023 15:48:43 +0100 Subject: Tests and coverage on gcc and clang --- tests/test-storage.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/test-storage.cpp') diff --git a/tests/test-storage.cpp b/tests/test-storage.cpp index 11d8a20..87168fc 100644 --- a/tests/test-storage.cpp +++ b/tests/test-storage.cpp @@ -64,29 +64,29 @@ TEST_F(StorageTest, create) TEST_F(StorageTest, getNumberOfDocuments) { Storage storage(m_config); - EXPECT_EQ(storage.getNumberOfDocuments(), 0); + EXPECT_EQ(storage.getNumberOfDocuments(), 0UL); storage.setDocument("123", "abc"); - EXPECT_EQ(storage.getNumberOfDocuments(), 1); + EXPECT_EQ(storage.getNumberOfDocuments(), 1UL); storage.setDocument("def", "xyz"); - EXPECT_EQ(storage.getNumberOfDocuments(), 2); + EXPECT_EQ(storage.getNumberOfDocuments(), 2UL); } TEST_F(StorageTest, cleanup_empty) { Storage storage(m_config); - EXPECT_EQ(storage.getNumberOfDocuments(), 0); + EXPECT_EQ(storage.getNumberOfDocuments(), 0UL); storage.cleanup(); - EXPECT_EQ(storage.getNumberOfDocuments(), 0); + EXPECT_EQ(storage.getNumberOfDocuments(), 0UL); } TEST_F(StorageTest, cleanup) { Storage storage(m_config); - EXPECT_EQ(storage.getNumberOfDocuments(), 0); + EXPECT_EQ(storage.getNumberOfDocuments(), 0UL); storage.setDocument("123", "abc"); - EXPECT_EQ(storage.getNumberOfDocuments(), 1); + EXPECT_EQ(storage.getNumberOfDocuments(), 1UL); storage.cleanup(); - EXPECT_EQ(storage.getNumberOfDocuments(), 1); + EXPECT_EQ(storage.getNumberOfDocuments(), 1UL); } TEST_F(StorageTest, exists) @@ -111,7 +111,7 @@ TEST_F(StorageTest, setDocument) { Storage storage(m_config); storage.setDocument("0", "abc"); - EXPECT_EQ(storage.getNumberOfDocuments(), 1); + EXPECT_EQ(storage.getNumberOfDocuments(), 1UL); EXPECT_EQ(storage.getDocument("0"), "abc"); } @@ -121,7 +121,7 @@ TEST_F(StorageTest, setRevision) storage.setDocument("0", "abc"); storage.setRevision("0", 123); - EXPECT_EQ(storage.getNumberOfDocuments(), 1); + EXPECT_EQ(storage.getNumberOfDocuments(), 1UL); EXPECT_EQ(storage.getRevision("0"), 123); } @@ -131,7 +131,7 @@ TEST_F(StorageTest, setCursorPos) storage.setDocument("0", "abc"); storage.setCursorPos("0", 1234); - EXPECT_EQ(storage.getNumberOfDocuments(), 1); + EXPECT_EQ(storage.getNumberOfDocuments(), 1UL); EXPECT_EQ(storage.getCursorPos("0"), 1234); } @@ -140,7 +140,7 @@ TEST_F(StorageTest, setRow) Storage storage(m_config); storage.setRow("0", "abc", 56, 67); - EXPECT_EQ(storage.getNumberOfDocuments(), 1); + EXPECT_EQ(storage.getNumberOfDocuments(), 1UL); EXPECT_EQ(storage.getDocument("0"), "abc"); EXPECT_EQ(storage.getRevision("0"), 56); EXPECT_EQ(storage.getCursorPos("0"), 67); -- cgit v1.2.3