New upstream version 8.1.0

This commit is contained in:
geos_one
2025-08-10 01:34:16 +02:00
commit c891bb7105
4398 changed files with 838833 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#include <common/toolkit/EntryIdTk.h>
#include <gtest/gtest.h>
TEST(EntryIdTk, isValidHexToken)
{
using EntryIdTk::isValidHexToken;
EXPECT_TRUE(isValidHexToken("0"));
EXPECT_FALSE(isValidHexToken(""));
EXPECT_TRUE(isValidHexToken(std::string(8, '0')));
EXPECT_FALSE(isValidHexToken(std::string(9, '0')));
EXPECT_TRUE(isValidHexToken("123ADB"));
EXPECT_FALSE(isValidHexToken("123ADBS"));
}
TEST(EntryIdTk, isValidEntryIdFormat)
{
using EntryIdTk::isValidEntryIdFormat;
EXPECT_TRUE(isValidEntryIdFormat("0-59F03330-1"));
EXPECT_TRUE(isValidEntryIdFormat("0-0-0"));
EXPECT_FALSE(isValidEntryIdFormat("0-0-0-0"));
EXPECT_FALSE(isValidEntryIdFormat("0-0"));
EXPECT_FALSE(isValidEntryIdFormat("-0"));
EXPECT_FALSE(isValidEntryIdFormat("0-"));
EXPECT_FALSE(isValidEntryIdFormat("--"));
}