Lines Matching refs:isValidMdnsServiceName
21 static bool isValidMdnsServiceName(std::string_view name) { in isValidMdnsServiceName() function
70 EXPECT_FALSE(isValidMdnsServiceName("abcd1234abcd1234")); in TEST()
73 EXPECT_FALSE(isValidMdnsServiceName("a*a")); in TEST()
74 EXPECT_FALSE(isValidMdnsServiceName("a_a")); in TEST()
75 EXPECT_FALSE(isValidMdnsServiceName("_a")); in TEST()
78 EXPECT_FALSE(isValidMdnsServiceName("")); in TEST()
79 EXPECT_FALSE(isValidMdnsServiceName("-")); in TEST()
80 EXPECT_FALSE(isValidMdnsServiceName("-a")); in TEST()
81 EXPECT_FALSE(isValidMdnsServiceName("-1")); in TEST()
82 EXPECT_FALSE(isValidMdnsServiceName("a-")); in TEST()
83 EXPECT_FALSE(isValidMdnsServiceName("1-")); in TEST()
86 EXPECT_FALSE(isValidMdnsServiceName("a--a")); in TEST()
89 EXPECT_FALSE(isValidMdnsServiceName("1")); in TEST()
90 EXPECT_FALSE(isValidMdnsServiceName("12")); in TEST()
91 EXPECT_FALSE(isValidMdnsServiceName("1-2")); in TEST()
94 EXPECT_TRUE(isValidMdnsServiceName("a")); in TEST()
95 EXPECT_TRUE(isValidMdnsServiceName("a1")); in TEST()
96 EXPECT_TRUE(isValidMdnsServiceName("1A")); in TEST()
97 EXPECT_TRUE(isValidMdnsServiceName("aZ")); in TEST()
98 EXPECT_TRUE(isValidMdnsServiceName("a-Z")); in TEST()
99 EXPECT_TRUE(isValidMdnsServiceName("a-b-Z")); in TEST()
100 EXPECT_TRUE(isValidMdnsServiceName("abc-def-123-456")); in TEST()
104 EXPECT_TRUE(isValidMdnsServiceName(ADB_MDNS_SERVICE_TYPE)); in TEST()
105 EXPECT_TRUE(isValidMdnsServiceName(ADB_MDNS_TLS_PAIRING_TYPE)); in TEST()
106 EXPECT_TRUE(isValidMdnsServiceName(ADB_MDNS_TLS_CONNECT_TYPE)); in TEST()