Lines Matching refs:s2
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
773 EXPECT_TRUE(s2 == s2); in checkUnequal()
775 EXPECT_TRUE(isAddressEqual(s2, s2)); 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
784 EXPECT_TRUE(s2 == s2); in checkEqual()
786 EXPECT_TRUE(isAddressEqual(s2, s2)); 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()
813 DnsTlsServer s2(IPAddress::forString("fe80::1%2")); in TEST_F() local
814 checkUnequal(s1, s2); in TEST_F()
815 EXPECT_FALSE(isAddressEqual(s1, s2)); in TEST_F()
818 EXPECT_FALSE(s2.wasExplicitlyConfigured()); in TEST_F()
823 DnsTlsServer s2(IPSockAddr::toIPSockAddr("192.0.2.1", 854)); in TEST_F() local
824 checkUnequal(s1, s2); in TEST_F()
825 EXPECT_TRUE(isAddressEqual(s1, s2)); in TEST_F()
827 EXPECT_EQ(s2.toIpString(), "192.0.2.1"); in TEST_F()
837 EXPECT_FALSE(s2.wasExplicitlyConfigured()); in TEST_F()
841 DnsTlsServer s1(V4ADDR1), s2(V4ADDR1); in TEST_F() local
843 checkUnequal(s1, s2); in TEST_F()
844 s2.name = SERVERNAME2; in TEST_F()
845 checkUnequal(s1, s2); in TEST_F()
846 EXPECT_TRUE(isAddressEqual(s1, s2)); in TEST_F()
849 EXPECT_TRUE(s2.wasExplicitlyConfigured()); in TEST_F()
853 DnsTlsServer s1(V4ADDR1), s2(V4ADDR1); in TEST_F() local
854 checkEqual(s1, s2); in TEST_F()
856 checkEqual(s1, s2); in TEST_F()
857 s2.setValidationState(Validation::fail); in TEST_F()
858 checkEqual(s1, s2); in TEST_F()
860 checkEqual(s1, s2); in TEST_F()
861 s2.setActive(false); in TEST_F()
862 checkEqual(s1, s2); in TEST_F()
865 EXPECT_EQ(s2.validationState(), Validation::fail); in TEST_F()
867 EXPECT_FALSE(s2.active()); in TEST_F()