Lines Matching defs:words
73 std::vector< std::string > words;
76 words.clear();
77 str = join(words, ",");
80 words.clear();
81 words.push_back("");
82 str = join(words, ",");
85 words.clear();
86 words.push_back("");
87 words.push_back("");
88 str = join(words, ",");
91 words.clear();
92 words.push_back("foo");
93 words.push_back("");
94 words.push_back("baz");
95 str = join(words, ",");
98 words.clear();
99 words.push_back("foo");
100 words.push_back("bar");
101 words.push_back("baz");
102 str = join(words, ",");
108 std::set< std::string > words;
111 words.clear();
112 str = join(words, ",");
115 words.clear();
116 words.insert("");
117 str = join(words, ",");
120 words.clear();
121 words.insert("foo");
122 words.insert("");
123 words.insert("baz");
124 str = join(words, ",");
127 words.clear();
128 words.insert("foo");
129 words.insert("bar");
130 words.insert("baz");
131 str = join(words, ",");
171 std::vector< std::string > words;
173 words = split("", " ");
174 ATF_REQUIRE_EQ(words.size(), 0);
176 words = split(" ", " ");
177 ATF_REQUIRE_EQ(words.size(), 0);
179 words = split(" ", " ");
180 ATF_REQUIRE_EQ(words.size(), 0);
182 words = split("a b", " ");
183 ATF_REQUIRE_EQ(words.size(), 2);
184 ATF_REQUIRE_EQ(words[0], "a");
185 ATF_REQUIRE_EQ(words[1], "b");
187 words = split("a b c d", " ");
188 ATF_REQUIRE_EQ(words.size(), 4);
189 ATF_REQUIRE_EQ(words[0], "a");
190 ATF_REQUIRE_EQ(words[1], "b");
191 ATF_REQUIRE_EQ(words[2], "c");
192 ATF_REQUIRE_EQ(words[3], "d");
194 words = split("foo bar", " ");
195 ATF_REQUIRE_EQ(words.size(), 2);
196 ATF_REQUIRE_EQ(words[0], "foo");
197 ATF_REQUIRE_EQ(words[1], "bar");
199 words = split("foo bar baz foobar", " ");
200 ATF_REQUIRE_EQ(words.size(), 4);
201 ATF_REQUIRE_EQ(words[0], "foo");
202 ATF_REQUIRE_EQ(words[1], "bar");
203 ATF_REQUIRE_EQ(words[2], "baz");
204 ATF_REQUIRE_EQ(words[3], "foobar");
206 words = split(" foo bar", " ");
207 ATF_REQUIRE_EQ(words.size(), 2);
208 ATF_REQUIRE_EQ(words[0], "foo");
209 ATF_REQUIRE_EQ(words[1], "bar");
211 words = split("foo bar", " ");
212 ATF_REQUIRE_EQ(words.size(), 2);
213 ATF_REQUIRE_EQ(words[0], "foo");
214 ATF_REQUIRE_EQ(words[1], "bar");
216 words = split("foo bar ", " ");
217 ATF_REQUIRE_EQ(words.size(), 2);
218 ATF_REQUIRE_EQ(words[0], "foo");
219 ATF_REQUIRE_EQ(words[1], "bar");
221 words = split(" foo bar ", " ");
222 ATF_REQUIRE_EQ(words.size(), 2);
223 ATF_REQUIRE_EQ(words[0], "foo");
224 ATF_REQUIRE_EQ(words[1], "bar");
236 std::vector< std::string > words;
238 words = split("", "/");
239 ATF_REQUIRE_EQ(words.size(), 0);
241 words = split(" ", "/");
242 ATF_REQUIRE_EQ(words.size(), 1);
243 ATF_REQUIRE_EQ(words[0], " ");
245 words = split(" ", "/");
246 ATF_REQUIRE_EQ(words.size(), 1);
247 ATF_REQUIRE_EQ(words[0], " ");
249 words = split("a/b", "/");
250 ATF_REQUIRE_EQ(words.size(), 2);
251 ATF_REQUIRE_EQ(words[0], "a");
252 ATF_REQUIRE_EQ(words[1], "b");
254 words = split("aLONGDELIMbcdLONGDELIMef", "LONGDELIM");
255 ATF_REQUIRE_EQ(words.size(), 3);
256 ATF_REQUIRE_EQ(words[0], "a");
257 ATF_REQUIRE_EQ(words[1], "bcd");
258 ATF_REQUIRE_EQ(words[2], "ef");