Boost logo

Boost-Commit :

From: oryol_at_[hidden]
Date: 2007-09-18 21:50:13


Author: jeremypack
Date: 2007-09-18 21:50:12 EDT (Tue, 18 Sep 2007)
New Revision: 39380
URL: http://svn.boost.org/trac/boost/changeset/39380

Log:
Move examples to stage in test directory - this is the easiest way to get things like the MultipleInheritance example to test correctly.

Text files modified:
   sandbox/libs/extension/examples/Jamfile.v2 | 2 +-
   sandbox/libs/extension/test/multiple_inheritance_test.cpp | 26 +++++++-------------------
   sandbox/libs/extension/test/parameters_test.cpp | 8 +-------
   sandbox/libs/reflection/examples/Jamfile.v2 | 2 +-
   sandbox/libs/reflection/test/shared_library_test.cpp | 7 +------
   5 files changed, 11 insertions(+), 34 deletions(-)

Modified: sandbox/libs/extension/examples/Jamfile.v2
==============================================================================
--- sandbox/libs/extension/examples/Jamfile.v2 (original)
+++ sandbox/libs/extension/examples/Jamfile.v2 2007-09-18 21:50:12 EDT (Tue, 18 Sep 2007)
@@ -69,7 +69,7 @@
  # RegistryExample
   ;
 
-install ../bin :
+install ../test :
   HelloWorld HelloWorldLib
   Parameters ParametersLib
   MultilanguageWord MultilanguageHelloWorld

Modified: sandbox/libs/extension/test/multiple_inheritance_test.cpp
==============================================================================
--- sandbox/libs/extension/test/multiple_inheritance_test.cpp (original)
+++ sandbox/libs/extension/test/multiple_inheritance_test.cpp 2007-09-18 21:50:12 EDT (Tue, 18 Sep 2007)
@@ -27,11 +27,6 @@
 #define BOOST_TEST_DYN_LINK 1
 #include <boost/test/unit_test.hpp>
 
-#if defined(MSC_VER) || defined(WIN32)
-#define BOOST_EXTENSION_DIR_START "..\bin\"
-#else
-#define BOOST_EXTENSION_DIR_START "../bin/"
-#endif
 
 using namespace boost::extensions;
 
@@ -47,20 +42,13 @@
   // less descriptive
 
   // check if the libraries can be loaded
- shared_library libVehicle((std::string(BOOST_EXTENSION_DIR_START) +
- "libVehicle.extension").c_str());
- shared_library libCar((std::string(BOOST_EXTENSION_DIR_START) +
- "libCar.extension").c_str());
- shared_library libComputer((std::string(BOOST_EXTENSION_DIR_START) +
- "libComputer.extension").c_str());
- shared_library libBoat((std::string(BOOST_EXTENSION_DIR_START) +
- "libBoat.extension").c_str());
- shared_library libFlyingCar((std::string(BOOST_EXTENSION_DIR_START) +
- "libFlyingCar.extension").c_str());
- shared_library libCarOfTheFuture((std::string(BOOST_EXTENSION_DIR_START) +
- "libCarOfTheFuture.extension").c_str());
- shared_library libPlane((std::string(BOOST_EXTENSION_DIR_START) +
- "libPlane.extension").c_str());
+ shared_library libVehicle("libVehicle.extension");
+ shared_library libCar("libCar.extension");
+ shared_library libComputer("libComputer.extension");
+ shared_library libBoat("libBoat.extension");
+ shared_library libFlyingCar("libFlyingCar.extension");
+ shared_library libCarOfTheFuture("libCarOfTheFuture.extension");
+ shared_library libPlane("libPlane.extension");
   BOOST_CHECK_EQUAL( libVehicle.open(), true );
   BOOST_CHECK_EQUAL( libCar.open(), true );
   BOOST_CHECK_EQUAL( libComputer.open(), true );

Modified: sandbox/libs/extension/test/parameters_test.cpp
==============================================================================
--- sandbox/libs/extension/test/parameters_test.cpp (original)
+++ sandbox/libs/extension/test/parameters_test.cpp 2007-09-18 21:50:12 EDT (Tue, 18 Sep 2007)
@@ -19,19 +19,13 @@
 
 #include "../examples/parameters/lots_of_parameters_iface.hpp"
 
-#if defined(MSC_VER) || defined(WIN32)
-#define BOOST_EXTENSION_DIR_START "..\bin\"
-#else
-#define BOOST_EXTENSION_DIR_START "../bin/"
-#endif
 
 using namespace boost::extensions;
 
 BOOST_AUTO_TEST_CASE(parameters_example)
 {
   // check if the library can be loaded
- shared_library l((std::string(BOOST_EXTENSION_DIR_START) +
- "libParametersLib.extension").c_str());
+ shared_library l("libParametersLib.extension");
   BOOST_CHECK_EQUAL( l.open(), true );
 
   // check if the factory can return the functor

Modified: sandbox/libs/reflection/examples/Jamfile.v2
==============================================================================
--- sandbox/libs/reflection/examples/Jamfile.v2 (original)
+++ sandbox/libs/reflection/examples/Jamfile.v2 2007-09-18 21:50:12 EDT (Tue, 18 Sep 2007)
@@ -36,4 +36,4 @@
 exe extension-reflection : extension/extension.cpp ;
 lib car_lib : extension/car_lib.cpp : <link>shared ;
 
-install ../bin/ : car_lib extension-reflection ;
+install ../test/ : car_lib extension-reflection ;

Modified: sandbox/libs/reflection/test/shared_library_test.cpp
==============================================================================
--- sandbox/libs/reflection/test/shared_library_test.cpp (original)
+++ sandbox/libs/reflection/test/shared_library_test.cpp 2007-09-18 21:50:12 EDT (Tue, 18 Sep 2007)
@@ -24,16 +24,11 @@
 #include <boost/reflection/reflection.hpp>
 #include <iostream>
 #include <boost/function.hpp>
-#if defined(MSC_VER) || defined(WIN32)
-#define BOOST_EXTENSION_DIR_START "..\bin\"
-#else
-#define BOOST_EXTENSION_DIR_START "../bin/"
-#endif
 
 BOOST_AUTO_TEST_CASE(shared_library_basic_test) {
   std::map<std::string, boost::reflections::reflection> reflection_map;
   boost::extensions::shared_library lib
- ((std::string(BOOST_EXTENSION_DIR_START) + "libcar_lib.extension").c_str());
+ ("libcar_lib.extension");
   BOOST_CHECK(lib.open());
   lib.get<void, std::map<std::string,
     boost::reflections::reflection> &>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk