@@ -73,46 +73,6 @@ TEST(eTLDSerializationMatcher, basic) {
73
73
CHECK (testSerializeMatcher (" !one.com\n *.two.com\n three.com" ));
74
74
}
75
75
76
- bool testDeserializationCorrectness (const SerializedBuffer &rule_text,
77
- int num_rules, int num_exception_rules) {
78
- Matcher matcher = matcher_from_serialization (rule_text);
79
- int num_matcher_rules = static_cast <int >(matcher.NumRules ());
80
- if (num_matcher_rules != num_rules) {
81
- std::cout << " Expected " << num_rules << " rules from buffer, but received "
82
- << num_matcher_rules << " rules." << std::endl;
83
- return false ;
84
- }
85
-
86
- int num_matcher_except_rules = static_cast <int >(matcher.NumExceptionRules ());
87
- if (num_matcher_except_rules != num_exception_rules) {
88
- std::cout << " Expected " << num_rules << " exception rules from buffer, "
89
- << " but received " << num_exception_rules << " rules."
90
- << std::endl;
91
- return false ;
92
- }
93
-
94
- return true ;
95
- }
96
-
97
- // TEST(eTLDDeserializationTests, basic) {
98
- // CHECK(testDeserializationCorrectness(
99
- // "47:42:29:ff||not-matching-anything.com8:fftrees^0:", 2, 0));
100
- // }
101
-
102
- bool testSerializationCorrectness (const string &rule_text,
103
- const SerializedBuffer &serialized) {
104
- Matcher matcher (rule_text);
105
- SerializationResult result = matcher.Serialize ();
106
- return result.buffer .compare (serialized) == 0 ;
107
- }
108
-
109
- // TEST(eTLDSerializationTests, basic) {
110
- // const string rules = "||s3.amazonaws.com^$third-party\n"
111
- // "||not-matching-anything.com\n"
112
- // "trees^";
113
- // CHECK(testSerializationCorrectness(rules, ));
114
- // }
115
-
116
76
bool testMatcherSerializationTransitivity (const string &public_suffix_rules) {
117
77
Matcher orig (public_suffix_rules);
118
78
SerializationResult res = orig.Serialize ();
@@ -135,7 +95,7 @@ bool testAdBlockClientSerializationTransitivity(const string &filter_rules,
135
95
AdBlockClient client;
136
96
client.parse (filter_rules.c_str ());
137
97
client.parsePublicSuffixRules (public_suffix_rules.c_str ());
138
-
98
+
139
99
int size;
140
100
char * buffer = client.serialize (&size);
141
101
@@ -167,4 +127,4 @@ TEST(eTLDSerializationTransitivity, basic) {
167
127
CHECK (testMatcherSerializationTransitivity (public_suffix_rules));
168
128
CHECK (testAdBlockClientSerializationTransitivity (
169
129
filer_rules, public_suffix_rules));
170
- }
130
+ }
0 commit comments