diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-20 23:57:46 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-20 23:57:46 +0000 |
commit | f6cd72d39cdc7a034b36ad73d613f6f268826e48 (patch) | |
tree | 6ca964655dc8e2989087d1b32c26f60f7ea6aece /decoder/stringlib_test.cc | |
parent | 232cf4e95235bc29bf04e4ea2bf1483d1baf2b7d (diff) |
fabulous string tokenization tested
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@350 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/stringlib_test.cc')
-rwxr-xr-x | decoder/stringlib_test.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/decoder/stringlib_test.cc b/decoder/stringlib_test.cc new file mode 100755 index 00000000..ea39f30f --- /dev/null +++ b/decoder/stringlib_test.cc @@ -0,0 +1,17 @@ +#define STRINGLIB_DEBUG +#include "stringlib.h" + +using namespace std; +struct print { + template <class S> + void operator()(S const& s) const { + cout<<s<<endl; + } +}; + +int main(int argc, char *argv[]) { + char *p=" 1 are u 2 serious?"; + std::string const& w="verylongword"; + VisitTokens(p,print()); + VisitTokens(w,print()); +} |