Ignore:
Timestamp:
Oct 21, 2013, 6:07:37 AM (8 years ago)
Author:
Peter
Message:

implement replace(3), which fixes #768

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.10-stable/test/utility.cc

    r2940 r3093  
    5959void test_fnmatch(test::Suite& suite);
    6060bool test_fnmatch(bool, std::string, std::string);
     61void test_replace(test::Suite& suite);
    6162
    6263template<typename InputIterator, typename Key>
     
    216217  test_dirname(suite);
    217218  test_fnmatch(suite);
     219  test_replace(suite);
    218220
    219221  return suite.return_value();
     
    638640  return false;
    639641}
     642
     643
     644void test_replace(test::Suite& suite)
     645{
     646  std::string s = "Some magic string!!!";
     647  utility::replace(s, "magic", "arbitrary");
     648  if (!suite.add(s=="Some arbitrary string!!!"))
     649    suite.err() << "error: " << s << "\n";
     650}
Note: See TracChangeset for help on using the changeset viewer.