From d28db33c0814e319336c2ed3f447a8aa5f834d5f Mon Sep 17 00:00:00 2001 From: mat007 Date: Sun, 12 May 2013 08:58:55 +0000 Subject: [PATCH] Refactored conversion to boost layout git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@645 860be788-9bd5-4423-9f1e-828f051e677b --- .../doc/example/patterns_quick_constraint.cpp | 6 +- build/build.xml | 79 +++++++++++++++---- 2 files changed, 68 insertions(+), 17 deletions(-) diff --git a/build/boost/doc/example/patterns_quick_constraint.cpp b/build/boost/doc/example/patterns_quick_constraint.cpp index 7cfccc3..e07219d 100644 --- a/build/boost/doc/example/patterns_quick_constraint.cpp +++ b/build/boost/doc/example/patterns_quick_constraint.cpp @@ -31,16 +31,16 @@ namespace namespace mock // it could also be in the namespace of 'my_class' { - bool operator==( const my_class& actual, const std::string& expected ) // the trick is to compare to a string + bool operator==( const my_class& actual, const std::string& expected ) // the first part of trick is to compare to a string { return boost::lexical_cast< std::string >( actual ) == expected; } -} +} // mock BOOST_AUTO_TEST_CASE( method_is_called ) { my_mock mock; - MOCK_EXPECT( mock.method ).once().with( "my_class( 42 )" ); // the constraint is given as a string + MOCK_EXPECT( mock.method ).once().with( "my_class( 42 )" ); // the second part of the trick is to express the constraint as a string mock.method( my_class( 42 ) ); } //] diff --git a/build/build.xml b/build/build.xml index 648ca2f..ae8f197 100644 --- a/build/build.xml +++ b/build/build.xml @@ -120,8 +120,15 @@ - - + + + + + + + + + @@ -139,37 +146,81 @@ - + + + + + + + + + + + + + + + + + + + +