Main | License | Installation | FAQ | Screenshots | Contact | Links | Sf.net | Freshmeat.net | KDE-Apps.org
Requirements | Design | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

test.cpp File Reference

#include <iostream>
#include "error.hpp"
#include "utils.hpp"

Go to the source code of this file.

Functions

int main (void)


Function Documentation

int main ( void   ) 

Definition at line 22 of file test.cpp.

References ERRORMACRO, replaceAll(), and Error::what().

00023 {
00024   int retVal = 0;
00025   try {
00026     // Test replacement of substrings.
00027     string
00028       testString = "waaxyaayxawaayxyaaawwaaw",
00029       replaceResult = replaceAll( replaceAll( testString, "yxy", "zz" ),
00030                                   "w", "" );
00031     ERRORMACRO( replaceResult == "aaxyaayxaaazzaaaaa", Error, ,
00032                 "Replacing \"yxy\" by \"zz\" and \"w\" by \"\" in \""
00033                 << testString << "\" must not result in \""
00034                 << replaceResult << "\"." );
00035                        
00036   } catch ( Error &e ) {
00037     cerr << e.what() << std::endl;
00038     retVal = 1;
00039   };
00040   return retVal;
00041 }



anymeal 0.30 - recipe management software - Make the most of your food! - © Jan Wedekind Sun Sep 14 16:01:27 2008 - GNU Free Documentation License