source: testjes/testhex.cpp @ 10

Last change on this file since 10 was 10, checked in by willem, 11 years ago

willem

File size: 758 bytes
Line 
1// g++ testhex.cpp ../trunk/wutils.cpp -I ../trunk
2#include <iostream>
3#include "wutils.h"
4void doit1(std::string a)
5{
6  std::cout << "zstrtohex '"<<a<<"' ->'"<<zstrtohex(a)<<"'"<<std::endl;
7  std::cout << " strtohex '"<<a<<"' ->'"<< strtohex(a)<<"'"<<std::endl;
8}
9void doit2(std::string a)
10{
11  std::cout << "zhextostr '"<<a<<"' ->'"<<zhextostr(a)<<"'"<<std::endl;
12  std::cout << " hextostr '"<<a<<"' ->'"<< hextostr(a)<<"'"<<std::endl;
13}
14int main()
15{
16  doit1("stopos");
17  doit1("");
18  doit1("   zz  ");
19
20  doit2(ZBEGIN_+"616170"+ZEND_);
21  doit2(ZBEGIN_+"616170"+ZEND_+"31");
22  doit2(ZBEGIN_+ZEND_);
23  doit2(ZBEGIN_+"31");
24  doit2("615170");
25
26  doit1("gdbm");
27  doit1("willem.qR7w3XQp");
28  doit1("mypool");
29  doit1("add");
30  doit1("no");
31  doit1("1 2 3");
32}
Note: See TracBrowser for help on using the repository browser.