test_intermod_holder.cpp 866 B

12345678910111213141516171819202122232425262728293031323334
  1. /* Boost.Flyweight test of intermodule_holder.
  2. *
  3. * Copyright 2006-2008 Joaquin M Lopez Munoz.
  4. * Distributed under the Boost Software License, Version 1.0.
  5. * (See accompanying file LICENSE_1_0.txt or copy at
  6. * http://www.boost.org/LICENSE_1_0.txt)
  7. *
  8. * See http://www.boost.org/libs/flyweight for library home page.
  9. */
  10. #include "test_intermod_holder.hpp"
  11. #include "intermod_holder_dll.hpp"
  12. #include "test_basic_template.hpp"
  13. using namespace boost::flyweights;
  14. struct intermodule_holder_flyweight_specifier1
  15. {
  16. template<typename T>
  17. struct apply
  18. {
  19. typedef flyweight<T,intermodule_holder> type;
  20. };
  21. };
  22. void test_intermodule_holder()
  23. {
  24. test_basic_template<intermodule_holder_flyweight_specifier1>();
  25. intermodule_flyweight_string str=
  26. create_intermodule_flyweight_string("boost");
  27. BOOST_TEST(str==intermodule_flyweight_string("boost"));
  28. }