Home | History | Annotate | Download | only in testing

Lines Matching refs:atoms

14   vector<string> atoms;
34 v.f.Compile(&v.atoms);
35 EXPECT_EQ(0, v.atoms.size());
49 v.f.Compile(&v.atoms);
50 EXPECT_EQ(1, v.atoms.size());
51 EXPECT_EQ(v.atoms[0], "\xde\xadq\xbe\xef");
61 // If any test needs more than this many regexps or atoms, increase
64 const char* atoms[20];
74 // This test checks that all atoms of length greater than min length
75 // are found, and no atoms that are of smaller length are found.
91 // Test to make sure that any atoms that have another atom as a
140 v->f.Compile(&v->atoms);
143 bool CheckExpectedAtoms(const char* atoms[],
149 expected.push_back(atoms[i]);
151 bool pass = expected.size() == v->atoms.size();
153 sort(v->atoms.begin(), v->atoms.end());
156 pass = pass && expected[i] == v->atoms[i];
160 LOG(WARNING) << "Expected #atoms = " << expected.size();
163 LOG(WARNING) << "Found #atoms = " << v->atoms.size();
164 for (int i = 0; i < v->atoms.size(); i++)
165 LOG(WARNING) << v->atoms[i];
182 for (natom = 0; natom < arraysize(t->atoms); natom++)
183 if (t->atoms[natom] == NULL)
186 if (!CheckExpectedAtoms(t->atoms, natom, t->testname, &v))
192 void FindAtomIndices(const vector<string> atoms,
198 for (; j < atoms.size(); j++) {
199 if (matched_atoms[i] == atoms[j]) {
203 EXPECT_LT(j, atoms.size());
243 // atoms = abc
245 vector<string> atoms;
246 atoms.push_back("abc");
247 FindAtomIndices(v.atoms, atoms, &atom_ids);
253 atoms.clear();
254 atoms.push_back("abc");
255 atoms.push_back("yyy");
256 atoms.push_back("yyyzzz");
257 FindAtomIndices(v.atoms, atoms, &atom_ids);
262 atoms.clear();
263 atoms.push_back("abc");
264 atoms.push_back("abcd");
265 atoms.push_back("yyy");
266 atoms.push_back("yyyzzz");
267 FindAtomIndices(v.atoms, atoms, &atom_ids);