diff --git a/libs/function/test/contains2_test.cpp b/libs/function/test/contains2_test.cpp
new file mode 100644
index 0000000..2127eb8
--- /dev/null
+++ b/libs/function/test/contains2_test.cpp
@@ -0,0 +1,88 @@
+// Boost.Function library
+
+//  Copyright Douglas Gregor 2004.
+//  Copyright 2005 Peter Dimov
+
+//  Use, modification and distribution is subject to
+//  the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/function.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+static int forty_two()
+{
+    return 42;
+}
+
+struct Seventeen
+{
+    int operator()() const
+    {
+        return 17;
+    }
+};
+
+bool operator==(const Seventeen&, const Seventeen&)
+{
+    return true;
+}
+
+struct ReturnInt
+{
+    explicit ReturnInt(int value) : value(value)
+    {
+    }
+
+    int operator()() const
+    {
+        return value;
+    }
+
+    int value;
+};
+
+bool operator==(const ReturnInt& x, const ReturnInt& y)
+{
+    return x.value == y.value;
+}
+
+bool operator!=(const ReturnInt& x, const ReturnInt& y)
+{
+    return x.value != y.value;
+}
+
+int main()
+{
+    ndnboost::function0<int> fn;
+
+    fn = &forty_two;
+
+    BOOST_TEST( fn() == 42 );
+
+    BOOST_TEST( fn.contains(&forty_two) );
+    BOOST_TEST( !fn.contains( Seventeen() ) );
+    BOOST_TEST( !fn.contains( ReturnInt(0) ) );
+    BOOST_TEST( !fn.contains( ReturnInt(12) ) );
+
+    fn = Seventeen();
+
+    BOOST_TEST( fn() == 17 );
+
+    BOOST_TEST( !fn.contains( &forty_two ) );
+    BOOST_TEST( fn.contains( Seventeen() ) );
+    BOOST_TEST( !fn.contains( ReturnInt(0) ) );
+    BOOST_TEST( !fn.contains( ReturnInt(12) ) );
+
+    fn = ReturnInt(12);
+
+    BOOST_TEST( fn() == 12 );
+
+    BOOST_TEST( !fn.contains( &forty_two ) );
+    BOOST_TEST( !fn.contains( Seventeen() ) );
+    BOOST_TEST( !fn.contains( ReturnInt(0) ) );
+    BOOST_TEST( fn.contains( ReturnInt(12) ) );
+
+    return ndnboost::report_errors();
+}
