Lines Matching refs:s1

764 bool isAddressEqual(const DnsTlsServer& s1, const DnsTlsServer& s2) {  in isAddressEqual()  argument
765 bool cmp1 = ADDRESS_COMPARATOR(s1, s2); in isAddressEqual()
766 bool cmp2 = ADDRESS_COMPARATOR(s2, s1); in isAddressEqual()
771 void checkUnequal(const DnsTlsServer& s1, const DnsTlsServer& s2) { in checkUnequal() argument
772 EXPECT_TRUE(s1 == s1); in checkUnequal()
774 EXPECT_TRUE(isAddressEqual(s1, s1)); in checkUnequal()
777 EXPECT_TRUE(s1 < s2 ^ s2 < s1); in checkUnequal()
778 EXPECT_FALSE(s1 == s2); in checkUnequal()
779 EXPECT_FALSE(s2 == s1); in checkUnequal()
782 void checkEqual(const DnsTlsServer& s1, const DnsTlsServer& s2) { in checkEqual() argument
783 EXPECT_TRUE(s1 == s1); in checkEqual()
785 EXPECT_TRUE(isAddressEqual(s1, s1)); in checkEqual()
788 EXPECT_FALSE(s1 < s2); in checkEqual()
789 EXPECT_FALSE(s2 < s1); in checkEqual()
790 EXPECT_TRUE(s1 == s2); in checkEqual()
791 EXPECT_TRUE(s2 == s1); in checkEqual()
812 DnsTlsServer s1(IPAddress::forString("fe80::1%1")); in TEST_F() local
814 checkUnequal(s1, s2); in TEST_F()
815 EXPECT_FALSE(isAddressEqual(s1, s2)); in TEST_F()
817 EXPECT_FALSE(s1.wasExplicitlyConfigured()); in TEST_F()
822 DnsTlsServer s1(IPSockAddr::toIPSockAddr("192.0.2.1", 853)); in TEST_F() local
824 checkUnequal(s1, s2); in TEST_F()
825 EXPECT_TRUE(isAddressEqual(s1, s2)); in TEST_F()
826 EXPECT_EQ(s1.toIpString(), "192.0.2.1"); in TEST_F()
836 EXPECT_FALSE(s1.wasExplicitlyConfigured()); in TEST_F()
841 DnsTlsServer s1(V4ADDR1), s2(V4ADDR1); in TEST_F() local
842 s1.name = SERVERNAME1; in TEST_F()
843 checkUnequal(s1, s2); in TEST_F()
845 checkUnequal(s1, s2); in TEST_F()
846 EXPECT_TRUE(isAddressEqual(s1, s2)); in TEST_F()
848 EXPECT_TRUE(s1.wasExplicitlyConfigured()); in TEST_F()
853 DnsTlsServer s1(V4ADDR1), s2(V4ADDR1); in TEST_F() local
854 checkEqual(s1, s2); in TEST_F()
855 s1.setValidationState(Validation::success); in TEST_F()
856 checkEqual(s1, s2); in TEST_F()
858 checkEqual(s1, s2); in TEST_F()
859 s1.setActive(true); in TEST_F()
860 checkEqual(s1, s2); in TEST_F()
862 checkEqual(s1, s2); in TEST_F()
864 EXPECT_EQ(s1.validationState(), Validation::success); in TEST_F()
866 EXPECT_TRUE(s1.active()); in TEST_F()