#include <iostream>#include "error.hpp"#include "utils.hpp"Go to the source code of this file.
Functions | |
| int | main (void) |
| 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 }