Changeset 3098 for trunk/test/utility.cc


Ignore:
Timestamp:
Oct 28, 2013, 7:24:00 AM (8 years ago)
Author:
Peter
Message:

merge release 0.10.3 into trunk

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/test/utility.cc

    r3082 r3098  
    66  Copyright (C) 2009, 2010, 2011 Peter Johansson
    77  Copyright (C) 2012 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2013 Peter Johansson
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    5960void test_fnmatch(test::Suite& suite);
    6061bool test_fnmatch(bool, std::string, std::string);
     62void test_replace(test::Suite& suite);
    6163
    6264template<typename InputIterator, typename Key>
     
    216218  test_dirname(suite);
    217219  test_fnmatch(suite);
     220  test_replace(suite);
    218221
    219222  return suite.return_value();
     
    643646  return false;
    644647}
     648
     649
     650void test_replace(test::Suite& suite)
     651{
     652  std::string s = "Some magic string!!!";
     653  utility::replace(s, "magic", "arbitrary");
     654  if (!suite.add(s=="Some arbitrary string!!!"))
     655    suite.err() << "error: " << s << "\n";
     656}
Note: See TracChangeset for help on using the changeset viewer.