| 25 | using namespace phxrpc; |
| 26 | |
| 27 | void PrintTree(SyntaxTree * stree) { |
| 28 | printf("proto file %s\n", stree->GetProtoFile()); |
| 29 | printf("prefix %s, name %s\n", stree->GetPrefix(), stree->GetName()); |
| 30 | |
| 31 | printf("\n"); |
| 32 | |
| 33 | SyntaxFuncVector * flist = stree->GetFuncList(); |
| 34 | SyntaxFuncVector::iterator fit = flist->begin(); |
| 35 | for (; flist->end() != fit; ++fit) { |
| 36 | printf("request %s, type %s\n", fit->GetReq()->GetName(), fit->GetReq()->GetType()); |
| 37 | printf("response %s, type %s\n", fit->GetResp()->GetName(), fit->GetResp()->GetType()); |
| 38 | printf("optstring %s, usage %s\n", fit->GetOptString(), fit->GetUsage()); |
| 39 | |
| 40 | printf("\n"); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | void test(const char * file) { |
| 45 | SyntaxTree stree; |
no test coverage detected