[complement-svn] SF.net SVN: complement: [1932] trunk/complement/explore/lib
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2008-06-30 12:50:46
|
Revision: 1932 http://complement.svn.sourceforge.net/complement/?rev=1932&view=rev Author: complement Date: 2008-06-30 05:50:41 -0700 (Mon, 30 Jun 2008) Log Message: ----------- Revert "fix opts/ut" This reverts commit bd109078f223aecfa6cf41029a50ed33f8e3c2eb. Modified Paths: -------------- trunk/complement/explore/lib/misc/ut/opts_test.cc trunk/complement/explore/lib/mt/ut/Makefile Modified: trunk/complement/explore/lib/misc/ut/opts_test.cc =================================================================== --- trunk/complement/explore/lib/misc/ut/opts_test.cc 2008-06-30 12:31:55 UTC (rev 1931) +++ trunk/complement/explore/lib/misc/ut/opts_test.cc 2008-06-30 12:50:41 UTC (rev 1932) @@ -292,7 +292,6 @@ return EXAM_RESULT; } - int EXAM_IMPL(opts_test::defaults) { { @@ -325,18 +324,8 @@ opts << option<string>( "run tests by number", 'r', "run" )["0"]; - try { - opts.parse( argc , argv ); - - EXAM_CHECK( opts.is_set( 'r' ) ); - EXAM_CHECK( opts.get<string>( 'r' ) == "10" ); - } - catch( const Opts::unknown_option& e) { - } - catch( const Opts::arg_typemismatch&e ) { - } - catch( ... ) { - } + EXAM_CHECK( opts.is_set( 'r' ) ); + EXAM_CHECK( opts.get<string>( 'r' ) == "10" ); } { @@ -351,6 +340,18 @@ EXAM_CHECK( opts.get<string>( 'r' ) == "20" ); // but has default value } + { + const char* argv[] = { "name", "-r", "10" }; + int argc = sizeof( argv ) / sizeof(argv[0]); + + Opts opts; + + opts << option<string>( "run tests by number", 'r', "run" ); + + EXAM_CHECK( opts.is_set( 'r' ) ); + EXAM_CHECK( opts.get<string>( 'r' ) == "10" ); + } + return EXAM_RESULT; } Modified: trunk/complement/explore/lib/mt/ut/Makefile =================================================================== --- trunk/complement/explore/lib/mt/ut/Makefile 2008-06-30 12:31:55 UTC (rev 1931) +++ trunk/complement/explore/lib/mt/ut/Makefile 2008-06-30 12:50:41 UTC (rev 1932) @@ -49,7 +49,7 @@ endif -release-shared : LDLIBS = -lxmt -lexam -lboost_filesystem +release-shared : LDLIBS = -lxmt -lexam -lboost_fs dbg-shared : LDLIBS = -lxmtg -lexamg -lboost_fsg ifndef WITHOUT_STLPORT stldbg-shared : LDLIBS = -lxmtstlg -lexamstlg -lboost_fsstlg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |