summaryrefslogtreecommitdiff
path: root/decoder/stringlib_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/stringlib_test.cc')
-rwxr-xr-xdecoder/stringlib_test.cc17
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());
+}