cleaning up...

llvm-svn: 121275
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
new file mode 100644
index 0000000..41c9999
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// pointer_to_binary_function
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+double binary_f(int i, short j) {return i - j + .75;}
+
+int main()
+{
+    typedef std::pointer_to_binary_function<int, short, double> F;
+    static_assert((std::is_base_of<std::binary_function<int, short, double>, F>::value), "");
+    const F f(binary_f);
+    assert(f(36, 27) == 9.75);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
new file mode 100644
index 0000000..126cf32
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// pointer_to_unary_function
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+double unary_f(int i) {return 0.5 - i;}
+
+int main()
+{
+    typedef std::pointer_to_unary_function<int, double> F;
+    static_assert((std::is_base_of<std::unary_function<int, double>, F>::value), "");
+    const F f(unary_f);
+    assert(f(36) == -35.5);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
new file mode 100644
index 0000000..c7ce90d
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template <CopyConstructible Arg, Returnable Result>
+// pointer_to_unary_function<Arg, Result>
+// ptr_fun(Result (*f)(Arg));
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+double unary_f(int i) {return 0.5 - i;}
+
+int main()
+{
+    assert(std::ptr_fun(unary_f)(36) == -35.5);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
new file mode 100644
index 0000000..17c4b61
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template <CopyConstructible Arg1, CopyConstructible Arg2, Returnable Result>
+// pointer_to_binary_function<Arg1,Arg2,Result>
+// ptr_fun(Result (*f)(Arg1, Arg2));
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+double binary_f(int i, short j) {return i - j + .75;}
+
+int main()
+{
+    assert(std::ptr_fun(binary_f)(36, 27) == 9.75);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
new file mode 100644
index 0000000..455eed9
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<cReturnable S, ClassType T>
+//   const_mem_fun_t<S,T>
+//   mem_fun(S (T::*f)() const);
+
+#include <functional>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    const A a = A();
+    assert(std::mem_fun(&A::a3)(&a) == 1);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
new file mode 100644
index 0000000..46fd6d2
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T, CopyConstructible A>
+//   const_mem_fun1_t<S,T,A>
+//   mem_fun(S (T::*f)(A) const);
+
+#include <functional>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    const A a = A();
+    assert(std::mem_fun(&A::a4)(&a, 6) == 5);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
new file mode 100644
index 0000000..0c4bb93
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// const_mem_fun1_ref_t
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    typedef std::const_mem_fun1_ref_t<double, A, unsigned> F;
+    static_assert((std::is_base_of<std::binary_function<A, unsigned, double>, F>::value), "");
+    const F f(&A::a4);
+    const A a = A();
+    assert(f(a, 6) == 5);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
new file mode 100644
index 0000000..ca670bc
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// const_mem_fun1_t
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    typedef std::const_mem_fun1_t<double, A, unsigned> F;
+    static_assert((std::is_base_of<std::binary_function<const A*, unsigned, double>, F>::value), "");
+    const F f(&A::a4);
+    const A a = A();
+    assert(f(&a, 6) == 5);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
new file mode 100644
index 0000000..74d8950
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T>
+//   const_mem_fun_ref_t<S,T>
+//   mem_fun_ref(S (T::*f)() const);
+
+#include <functional>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    const A a = A();
+    assert(std::mem_fun_ref(&A::a3)(a) == 1);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
new file mode 100644
index 0000000..b858561
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T, CopyConstructible A>
+//   const_mem_fun1_ref_t<S,T,A>
+//   mem_fun_ref(S (T::*f)(A) const);
+
+#include <functional>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    const A a = A();
+    assert(std::mem_fun_ref(&A::a4)(a, 6) == 5);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
new file mode 100644
index 0000000..9eec24e
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// const_mem_fun_ref_t
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    typedef std::const_mem_fun_ref_t<int, A> F;
+    static_assert((std::is_base_of<std::unary_function<A, int>, F>::value), "");
+    const F f(&A::a3);
+    const A a = A();
+    assert(f(a) == 1);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
new file mode 100644
index 0000000..9681b74
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// const_mem_fun_t
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    typedef std::const_mem_fun_t<int, A> F;
+    static_assert((std::is_base_of<std::unary_function<const A*, int>, F>::value), "");
+    const F f(&A::a3);
+    const A a = A();
+    assert(f(&a) == 1);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
new file mode 100644
index 0000000..d0d28600
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T>
+//   mem_fun_t<S,T>
+//   mem_fun(S (T::*f)());
+
+#include <functional>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    A a;
+    assert(std::mem_fun(&A::a1)(&a) == 5);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
new file mode 100644
index 0000000..acee9af
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T, CopyConstructible A>
+//   mem_fun1_t<S,T,A>
+//   mem_fun(S (T::*f)(A));
+
+#include <functional>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    A a;
+    assert(std::mem_fun(&A::a2)(&a, 5) == 6);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
new file mode 100644
index 0000000..a78cbf2
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// mem_fun1_ref_t
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    typedef std::mem_fun1_ref_t<short, A, int> F;
+    static_assert((std::is_base_of<std::binary_function<A, int, short>, F>::value), "");
+    const F f(&A::a2);
+    A a;
+    assert(f(a, 5) == 6);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
new file mode 100644
index 0000000..90ba9bb
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// mem_fun1_t
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    typedef std::mem_fun1_t<short, A, int> F;
+    static_assert((std::is_base_of<std::binary_function<A*, int, short>, F>::value), "");
+    const F f(&A::a2);
+    A a;
+    assert(f(&a, 5) == 6);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
new file mode 100644
index 0000000..d3843fc
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T>
+//   mem_fun_ref_t<S,T>
+//   mem_fun_ref(S (T::*f)());
+
+#include <functional>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    A a;
+    assert(std::mem_fun_ref(&A::a1)(a) == 5);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
new file mode 100644
index 0000000..39a324d
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template<Returnable S, ClassType T, CopyConstructible A>
+//   mem_fun1_ref_t<S,T,A>
+//   mem_fun_ref(S (T::*f)(A));
+
+#include <functional>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    A a;
+    assert(std::mem_fun_ref(&A::a2)(a, 5) == 6);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
new file mode 100644
index 0000000..236d8d0
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// mem_fun_ref_t
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    typedef std::mem_fun_ref_t<char, A> F;
+    static_assert((std::is_base_of<std::unary_function<A, char>, F>::value), "");
+    const F f(&A::a1);
+    A a;
+    assert(f(a) == 5);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
new file mode 100644
index 0000000..3fc84cd
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// mem_fun_t
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+struct A
+{
+    char a1() {return 5;}
+    short a2(int i) {return short(i+1);}
+    int a3() const {return 1;}
+    double a4(unsigned i) const {return i-1;}
+};
+
+int main()
+{
+    typedef std::mem_fun_t<char, A> F;
+    static_assert((std::is_base_of<std::unary_function<A*, char>, F>::value), "");
+    const F f(&A::a1);
+    A a;
+    assert(f(&a) == 5);
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.base/nothing_to_do.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.adaptors/nothing_to_do.pass.cpp
similarity index 100%
rename from libcxx/test/depr/depr.function.objects/depr.base/nothing_to_do.pass.cpp
rename to libcxx/test/depr/depr.function.objects/depr.adaptors/nothing_to_do.pass.cpp
diff --git a/libcxx/test/depr/depr.function.objects/depr.base/binary_function.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.base/binary_function.pass.cpp
new file mode 100644
index 0000000..ddca8fd
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.base/binary_function.pass.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template <class Arg1, class Arg2, class Result>
+// struct binary_function
+// {
+//     typedef Arg1   first_argument_type;
+//     typedef Arg2   second_argument_type;
+//     typedef Result result_type;
+// };
+
+#include <functional>
+#include <type_traits>
+
+int main()
+{
+    static_assert((std::is_same<std::binary_function<int, unsigned, char>::first_argument_type, int>::value), "");
+    static_assert((std::is_same<std::binary_function<int, unsigned, char>::second_argument_type, unsigned>::value), "");
+    static_assert((std::is_same<std::binary_function<int, unsigned, char>::result_type, char>::value), "");
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.base/unary_function.pass.cpp b/libcxx/test/depr/depr.function.objects/depr.base/unary_function.pass.cpp
new file mode 100644
index 0000000..87cfe09
--- /dev/null
+++ b/libcxx/test/depr/depr.function.objects/depr.base/unary_function.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template <class Arg, class Result>
+// struct unary_function
+// {
+//     typedef Arg    argument_type;
+//     typedef Result result_type;
+// };
+
+#include <functional>
+#include <type_traits>
+
+int main()
+{
+    static_assert((std::is_same<std::unary_function<unsigned, char>::argument_type, unsigned>::value), "");
+    static_assert((std::is_same<std::unary_function<unsigned, char>::result_type, char>::value), "");
+}
diff --git a/libcxx/test/depr/depr.function.objects/depr.base/nothing_to_do.pass.cpp b/libcxx/test/depr/depr.function.objects/nothing_to_do.pass.cpp
similarity index 100%
copy from libcxx/test/depr/depr.function.objects/depr.base/nothing_to_do.pass.cpp
copy to libcxx/test/depr/depr.function.objects/nothing_to_do.pass.cpp