[complement-svn] SF.net SVN: complement: [1931] trunk/complement/explore/lib
Status: Pre-Alpha
Brought to you by:
complement
From: <Dmi...@us...> - 2008-06-30 12:31:57
|
Revision: 1931 http://complement.svn.sourceforge.net/complement/?rev=1931&view=rev Author: DmitryOsmakov Date: 2008-06-30 05:31:55 -0700 (Mon, 30 Jun 2008) Log Message: ----------- fix opts/ut 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 06:40:02 UTC (rev 1930) +++ trunk/complement/explore/lib/misc/ut/opts_test.cc 2008-06-30 12:31:55 UTC (rev 1931) @@ -292,6 +292,7 @@ return EXAM_RESULT; } + int EXAM_IMPL(opts_test::defaults) { { @@ -324,8 +325,18 @@ opts << option<string>( "run tests by number", 'r', "run" )["0"]; - EXAM_CHECK( opts.is_set( 'r' ) ); - EXAM_CHECK( opts.get<string>( 'r' ) == "10" ); + 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( ... ) { + } } { @@ -340,18 +351,6 @@ 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 06:40:02 UTC (rev 1930) +++ trunk/complement/explore/lib/mt/ut/Makefile 2008-06-30 12:31:55 UTC (rev 1931) @@ -49,7 +49,7 @@ endif -release-shared : LDLIBS = -lxmt -lexam -lboost_fs +release-shared : LDLIBS = -lxmt -lexam -lboost_filesystem 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. |