Commit 88c3b49a697042190d5b8e97cfbb0786f1371ea0
- Diff rendering mode:
- inline
- side by side
test/unit/suite.cc
(7 / 6)
|   | |||
| 67 | 67 | opts.description( "test suite for 'sockios' framework" ); | |
| 68 | 68 | opts.usage( "[options]" ); | |
| 69 | 69 | ||
| 70 | opts << option<bool>( "print this help message", 'h', "help" ) | ||
| 71 | << option<bool>( "list all test cases", 'l', "list" ) | ||
| 70 | opts << option<void>( "print this help message", 'h', "help" ) | ||
| 71 | << option<void>( "list all test cases", 'l', "list" ) | ||
| 72 | 72 | << option<std::string>( "run tests by number", 'r', "run" )["0"] | |
| 73 | << option<bool>( "print status of tests within test suite", 'v', "verbose" ) | ||
| 74 | << option<bool>( "trace checks", 't', "trace" ); | ||
| 73 | << option<void>( "print status of tests within test suite", 'v', "verbose" ) | ||
| 74 | << option<void>( "trace checks", 't', "trace" ); | ||
| 75 | 75 | ||
| 76 | 76 | try { | |
| 77 | 77 | opts.parse( argc, argv ); | |
| … | … | ||
| 812 | 812 | if ( opts.is_set( 'r' ) ) { | |
| 813 | 813 | std::stringstream ss( opts.get<std::string>( 'r' ) ); | |
| 814 | 814 | int n; | |
| 815 | int res = 0; | ||
| 815 | 816 | while ( ss >> n ) { | |
| 816 | t.single( n ); | ||
| 817 | res |= t.single( n ); | ||
| 817 | 818 | } | |
| 818 | 819 | ||
| 819 | return 0; | ||
| 820 | return res; | ||
| 820 | 821 | } | |
| 821 | 822 | ||
| 822 | 823 | return t.girdle(); |

