diff --git a/libs/functional/factory/test/Jamfile b/libs/functional/factory/test/Jamfile
new file mode 100644
index 0000000..6c4f6eb
--- /dev/null
+++ b/libs/functional/factory/test/Jamfile
@@ -0,0 +1,18 @@
+
+# (C) Copyright Tobias Schwinger
+#
+# Use modification and distribution are subject to the boost Software License,
+# Version 1.0. (See http:/\/www.boost.org/LICENSE_1_0.txt).
+
+import testing ;
+
+project factory-tests
+    ;
+
+test-suite functional/factory
+    :
+      [ run value_factory.cpp ]
+      [ run factory.cpp ]
+      [ run factory_with_allocator.cpp ]
+    ;
+
diff --git a/libs/functional/factory/test/factory.cpp b/libs/functional/factory/test/factory.cpp
new file mode 100644
index 0000000..4d47f28
--- /dev/null
+++ b/libs/functional/factory/test/factory.cpp
@@ -0,0 +1,36 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    Use modification and distribution are 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/functional/factory.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <memory>
+
+class sum 
+{
+    int val_sum;
+  public:
+    sum(int a, int b) : val_sum(a + b) { }
+
+    operator int() const { return this->val_sum; }
+};
+
+int main()
+{
+    int one = 1, two = 2;
+    {
+      sum* instance( ndnboost::factory< sum* >()(one,two) );
+      BOOST_TEST(*instance == 3);
+    }
+    {
+      std::auto_ptr<sum> instance( ndnboost::factory< std::auto_ptr<sum> >()(one,two) );
+      BOOST_TEST(*instance == 3);
+    }
+    return ndnboost::report_errors();
+}
+
diff --git a/libs/functional/factory/test/factory_with_allocator.cpp b/libs/functional/factory/test/factory_with_allocator.cpp
new file mode 100644
index 0000000..b2c6c99
--- /dev/null
+++ b/libs/functional/factory/test/factory_with_allocator.cpp
@@ -0,0 +1,79 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    Use modification and distribution are 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/functional/factory.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <cstddef>
+#include <memory>
+#include <boost/shared_ptr.hpp>
+
+using std::size_t;
+
+class sum 
+{
+    int val_sum;
+  public:
+    sum(int a, int b) : val_sum(a + b) { }
+
+    operator int() const { return this->val_sum; }
+};
+
+template< typename T >
+class counting_allocator : public std::allocator<T>
+{
+  public:
+    counting_allocator()
+    { }
+
+    template< typename OtherT >
+    struct rebind { typedef counting_allocator<OtherT> other; };
+
+    template< typename OtherT >
+    counting_allocator(counting_allocator<OtherT> const& that)
+    { }
+
+    static size_t n_allocated;
+    T* allocate(size_t n, void const* hint = 0l)
+    {
+        n_allocated += 1;
+        return std::allocator<T>::allocate(n,hint);
+    }
+
+    static size_t n_deallocated;
+    void deallocate(T* ptr, size_t n)
+    {
+        n_deallocated += 1;
+        return std::allocator<T>::deallocate(ptr,n);
+    }
+};
+template< typename T > size_t counting_allocator<T>::n_allocated = 0;
+template< typename T > size_t counting_allocator<T>::n_deallocated = 0;
+
+int main()
+{
+    int one = 1, two = 2;
+    {
+      ndnboost::shared_ptr<sum> instance(
+          ndnboost::factory< ndnboost::shared_ptr<sum>, counting_allocator<void>, 
+              ndnboost::factory_alloc_for_pointee_and_deleter >()(one,two) );
+      BOOST_TEST(*instance == 3);
+    }
+    BOOST_TEST(counting_allocator<sum>::n_allocated == 1); 
+    BOOST_TEST(counting_allocator<sum>::n_deallocated == 1);
+    {
+      ndnboost::shared_ptr<sum> instance(
+          ndnboost::factory< ndnboost::shared_ptr<sum>, counting_allocator<void>,
+              ndnboost::factory_passes_alloc_to_smart_pointer >()(one,two) );
+      BOOST_TEST(*instance == 3);
+    }
+    BOOST_TEST(counting_allocator<sum>::n_allocated == 2); 
+    BOOST_TEST(counting_allocator<sum>::n_deallocated == 2);
+    return ndnboost::report_errors();
+}
+
diff --git a/libs/functional/factory/test/value_factory.cpp b/libs/functional/factory/test/value_factory.cpp
new file mode 100644
index 0000000..5462ffb
--- /dev/null
+++ b/libs/functional/factory/test/value_factory.cpp
@@ -0,0 +1,29 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    Use modification and distribution are 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/functional/value_factory.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+class sum 
+{
+    int val_sum;
+  public:
+    sum(int a, int b) : val_sum(a + b) { }
+    operator int() const { return this->val_sum; }
+};
+
+int main()
+{
+    int one = 1, two = 2;
+    {
+      sum instance( ndnboost::value_factory< sum >()(one,two) );
+      BOOST_TEST(instance == 3);
+    }
+    return ndnboost::report_errors();
+}
+
