• Home
  • Raw
  • Download

Lines Matching refs:sr1

75     string_ref sr1 ( arg );  in reverse()  local
76 std::string string1 ( sr1.rbegin (), sr1.rend ()); in reverse()
82 BOOST_TEST ( std::equal ( sr1.begin (), sr1.end (), string2.begin ())); in reverse()
92 string_ref sr1; in find() local
97 BOOST_TEST ( sr1.find (sr2) == 0 ); in find()
98 BOOST_TEST ( sr1.rfind(sr2) == 0 ); in find()
102 sr1 = arg; in find()
104 string_ref::size_type pos = sr1.find(*p); in find()
111 sr1 = arg; in find()
113 string_ref::size_type pos = sr1.rfind(*p); in find()
114 BOOST_TEST ( pos != string_ref::npos && pos < sr1.size () && ( pos >= ptr_diff ( p, arg ))); in find()
119 sr1 = arg; in find()
123 string_ref::size_type pos = sr1.find ( sr3 ); in find()
128 sr1 = arg; in find()
133 string_ref::size_type pos = sr1.find(ch); in find()
140 sr1 = arg; in find()
145 string_ref::size_type pos = sr1.rfind(ch); in find()
155 sr1 = arg; in find()
156 while ( !sr1.empty ()) { in find()
157 string_ref::size_type pos = sr1.find(*p); in find()
159 sr1.remove_prefix (1); in find()
164 sr1 = arg; in find()
166 while ( !sr1.empty ()) { in find()
167 string_ref::size_type pos = sr1.rfind(*p); in find()
168 BOOST_TEST ( pos == sr1.size () - 1 ); in find()
169 sr1.remove_suffix (1); in find()
174 sr1 = arg; in find()
176 while ( !sr1.empty ()) { in find()
177 string_ref::size_type pos = sr1.find_first_of(*p); in find()
179 sr1.remove_prefix (1); in find()
185 sr1 = arg; in find()
187 while ( !sr1.empty ()) { in find()
188 string_ref::size_type pos = sr1.find_last_of(*p); in find()
189 BOOST_TEST ( pos == sr1.size () - 1 ); in find()
190 sr1.remove_suffix (1); in find()
195 sr1 = arg; in find()
197 while ( !sr1.empty() ) { in find()
198 BOOST_TEST ( sr1.find_first_of ( sr2 ) == 0 ); in find()
199 BOOST_TEST ( sr1.find_first_not_of ( sr2 ) == string_ref::npos ); in find()
200 sr1.remove_prefix ( 1 ); in find()
204 sr1 = arg; in find()
206 string_ref::size_type pos1 = sr1.find_first_of(*p); in find()
207 string_ref::size_type pos2 = sr1.find_first_not_of(*p); in find()
208 BOOST_TEST ( pos1 != string_ref::npos && pos1 < sr1.size () && pos1 <= ptr_diff ( p, arg )); in find()
211 BOOST_TEST ( sr1[i] == *p ); in find()
212 BOOST_TEST ( sr1 [ pos2 ] != *p ); in find()
220 sr1 = arg; in find()
222 while ( !sr1.empty() ) { in find()
223 BOOST_TEST ( sr1.find_last_of ( sr2 ) == ( sr1.size () - 1 )); in find()
224 BOOST_TEST ( sr1.find_last_not_of ( sr2 ) == string_ref::npos ); in find()
225 sr1.remove_suffix ( 1 ); in find()
229 sr1 = arg; in find()
231 string_ref::size_type pos1 = sr1.find_last_of(*p); in find()
232 string_ref::size_type pos2 = sr1.find_last_not_of(*p); in find()
233 BOOST_TEST ( pos1 != string_ref::npos && pos1 < sr1.size () && pos1 >= ptr_diff ( p, arg )); in find()
234 BOOST_TEST ( pos2 == string_ref::npos || pos1 < sr1.size ()); in find()
236 for ( size_t i = sr1.size () -1 ; i > pos2; --i ) in find()
237 BOOST_TEST ( sr1[i] == *p ); in find()
238 BOOST_TEST ( sr1 [ pos2 ] != *p ); in find()
249 string_ref sr1; in to_string() local
254 sr1 = arg; in to_string()
256 str2 = sr1.to_string (); in to_string()
260 std::string str3 = static_cast<std::string> ( sr1 ); in to_string()
266 string_ref sr1; in compare() local
271 sr1 = arg; in compare()
272 BOOST_TEST ( sr1 == sr1); // compare string_ref and string_ref in compare()
273 BOOST_TEST ( sr1 == str1); // compare string and string_ref in compare()
274 BOOST_TEST ( str1 == sr1 ); // compare string_ref and string in compare()
275 BOOST_TEST ( sr1 == arg ); // compare string_ref and pointer in compare()
276 BOOST_TEST ( arg == sr1 ); // compare pointer and string_ref in compare()
278 if ( sr1.size () > 0 ) { in compare()
280 BOOST_TEST ( sr1 != str1 ); in compare()
281 BOOST_TEST ( str1 != sr1 ); in compare()
282 BOOST_TEST ( sr1 < str1 ); in compare()
283 BOOST_TEST ( sr1 <= str1 ); in compare()
284 BOOST_TEST ( str1 > sr1 ); in compare()
285 BOOST_TEST ( str1 >= sr1 ); in compare()
288 BOOST_TEST ( sr1 != str1 ); in compare()
289 BOOST_TEST ( str1 != sr1 ); in compare()
290 BOOST_TEST ( sr1 > str1 ); in compare()
291 BOOST_TEST ( sr1 >= str1 ); in compare()
292 BOOST_TEST ( str1 < sr1 ); in compare()
293 BOOST_TEST ( str1 <= sr1 ); in compare()