summaryrefslogtreecommitdiffhomepage
path: root/tests/test-storage.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-22 12:02:16 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-22 12:02:16 +0100
commit004db5e7e4e9ab6ac5b4730873c6b8f58da92930 (patch)
tree9b76e938558e24ad3a6778b2d725874a3dbe878b /tests/test-storage.cpp
parent6889067f0e4104eaced27bd2e1c303e70e23ca85 (diff)
Storage bugfix, whiteboard xml implementation
Diffstat (limited to 'tests/test-storage.cpp')
-rw-r--r--tests/test-storage.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/test-storage.cpp b/tests/test-storage.cpp
index ce19c3e..d8259e1 100644
--- a/tests/test-storage.cpp
+++ b/tests/test-storage.cpp
@@ -210,15 +210,20 @@ TEST_F(StorageTest, revision_increment)
TEST_F(StorageTest, generate_id)
{
Storage storage(*m_config);
- std::string a{storage.generate_id()};
- std::string b{storage.generate_id()};
+ for (int i = 0; i < 100; i++) {
+ std::string a{storage.generate_id()};
+ std::string b{storage.generate_id()};
- EXPECT_NE(a, b);
- EXPECT_NE(a, "");
- EXPECT_NE(b, "");
+ EXPECT_NE(a, b);
+ EXPECT_NE(a, "");
+ EXPECT_NE(b, "");
- EXPECT_GE(a.size(), 6);
+ EXPECT_GE(a.size(), 6);
+ for (char c: a + b) {
+ EXPECT_TRUE((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z'));
+ }
+ }
}
TEST_F(StorageTest, checksum32)