Socket: Make protocl() member return non-const SocketProtocol reference
[senf.git] / Socket / SocketPolicy.test.cc
index 0a99bdf..72ba433 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
 // Copyright (C) 2006
-// Fraunhofer Institute for Open Communication Systems (FOKUS) 
-// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -56,7 +56,7 @@ namespace {
     struct WritablePolicy : public WritePolicyBase {};
     struct UnwritablePolicy : public WritePolicyBase {};
 
-    template <class Policy>
+    template <class SPolicy>
     struct ConvertibleValue
     {
         ConvertibleValue() {}
@@ -64,14 +64,14 @@ namespace {
 
         template <class OtherPolicy>
         ConvertibleValue(ConvertibleValue<OtherPolicy> const & other,
-                         typename boost::enable_if< SocketPolicyIsBaseOf<Policy,OtherPolicy> >::type * = 0)
+                         typename boost::enable_if< SocketPolicyIsBaseOf<SPolicy,OtherPolicy> >::type * = 0)
             {}
 
         ConvertibleValue const & operator=(ConvertibleValue const & other)
             { return *this; }
 
         template <class OtherPolicy>
-        typename boost::enable_if< SocketPolicyIsBaseOf<Policy,OtherPolicy>,
+        typename boost::enable_if< SocketPolicyIsBaseOf<SPolicy,OtherPolicy>,
                                    ConvertibleValue >::type const &
         operator=(ConvertibleValue<OtherPolicy> const & other)
             { return *this; }
@@ -132,7 +132,7 @@ BOOST_AUTO_UNIT_TEST(socketPolicy)
         Policy3 p3;
 
         BOOST_CHECK_THROW( Policy1::checkBaseOf(p3), std::bad_cast );
-        BOOST_CHECK_NO_THROW( Policy3::checkBaseOf(p1) );
+        SENF_CHECK_NO_THROW( Policy3::checkBaseOf(p1) );
     }
 }