aboutsummaryrefslogtreecommitdiff
path: root/paludis/hooker_TEST.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-05-16 20:18:39 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-05-22 23:19:27 +0100
commit0174215ed434594d9288e38575a3aa41e2b10842 (patch)
tree6037c4c58a100e5a0cbca30ac7f3d911d8d57032 /paludis/hooker_TEST.cc
parent78d9a9bf0758140e0e8c03c5e8d3288f74efbb51 (diff)
downloadpaludis-0174215ed434594d9288e38575a3aa41e2b10842.tar.gz
paludis-0174215ed434594d9288e38575a3aa41e2b10842.tar.xz
Use nullptr
Diffstat (limited to 'paludis/hooker_TEST.cc')
-rw-r--r--paludis/hooker_TEST.cc35
1 files changed, 17 insertions, 18 deletions
diff --git a/paludis/hooker_TEST.cc b/paludis/hooker_TEST.cc
index f11889976..32b5c56c1 100644
--- a/paludis/hooker_TEST.cc
+++ b/paludis/hooker_TEST.cc
@@ -24,7 +24,6 @@
#include <paludis/util/make_named_values.hh>
#include <paludis/util/safe_ifstream.hh>
-#include <paludis/util/make_null_shared_ptr.hh>
#include <iterator>
@@ -43,23 +42,23 @@ TEST(Hooker, Works)
hooker.add_dir(FSPath("hooker_TEST_dir/"), false);
#ifdef ENABLE_PYTHON_HOOKS
result = hooker.perform_hook(Hook("py_hook"),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(0, result.max_exit_status());
#endif
result = hooker.perform_hook(Hook("simple_hook"),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(3, result.max_exit_status());
EXPECT_EQ("", result.output());
result = hooker.perform_hook(Hook("fancy_hook"),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(5, result.max_exit_status());
EXPECT_EQ("", result.output());
result = hooker.perform_hook(Hook("so_hook"),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(6, result.max_exit_status());
EXPECT_EQ("", result.output());
result = hooker.perform_hook(Hook("several_hooks"),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(7, result.max_exit_status());
EXPECT_EQ("", result.output());
@@ -74,7 +73,7 @@ TEST(Hooker, Ordering)
hooker.add_dir(FSPath("hooker_TEST_dir/"), false);
HookResult result(hooker.perform_hook(Hook("ordering"),
- make_null_shared_ptr()));
+ nullptr));
EXPECT_EQ(0, result.max_exit_status());
EXPECT_EQ("", result.output());
@@ -98,7 +97,7 @@ TEST(Hooker, BadHooks)
hooker.add_dir(FSPath("hooker_TEST_dir/"), false);
HookResult result(hooker.perform_hook(Hook("bad_hooks"),
- make_null_shared_ptr()));
+ nullptr));
EXPECT_EQ(123, result.max_exit_status());
EXPECT_EQ("", result.output());
@@ -117,7 +116,7 @@ TEST(Hooker, Cycles)
hooker.add_dir(FSPath("hooker_TEST_dir/"), false);
HookResult result(hooker.perform_hook(Hook("cycles"),
- make_null_shared_ptr()));
+ nullptr));
EXPECT_EQ(0, result.max_exit_status());
EXPECT_EQ("", result.output());
@@ -139,51 +138,51 @@ TEST(Hooker, Output)
result = hooker.perform_hook(Hook("simple_hook_output")
.grab_output(Hook::AllowedOutputValues()("foo")),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(0, result.max_exit_status());
EXPECT_EQ("foo", result.output());
result = hooker.perform_hook(Hook("fancy_hook_output")
.grab_output(Hook::AllowedOutputValues()("foo")),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(0, result.max_exit_status());
EXPECT_EQ("foo", result.output());
result = hooker.perform_hook(Hook("so_hook_output")
.grab_output(Hook::AllowedOutputValues()("foo")),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(0, result.max_exit_status());
EXPECT_EQ("foo", result.output());
#ifdef ENABLE_PYTHON_HOOKS
result = hooker.perform_hook(Hook("py_hook_output")
.grab_output(Hook::AllowedOutputValues()("foo")),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(0, result.max_exit_status());
EXPECT_EQ("foo", result.output());
#endif
result = hooker.perform_hook(Hook("several_hooks_output")
.grab_output(Hook::AllowedOutputValues()),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(0, result.max_exit_status());
EXPECT_EQ("one", result.output());
result = hooker.perform_hook(Hook("several_hooks_output")
.grab_output(Hook::AllowedOutputValues()("one")),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(0, result.max_exit_status());
EXPECT_EQ("one", result.output());
result = hooker.perform_hook(Hook("several_hooks_output")
.grab_output(Hook::AllowedOutputValues()("two")("three")),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ(0, result.max_exit_status());
EXPECT_EQ("two", result.output());
result = hooker.perform_hook(Hook("several_hooks_output")
.grab_output(Hook::AllowedOutputValues()("blah")),
- make_null_shared_ptr());
+ nullptr);
EXPECT_EQ("", result.output());
EXPECT_EQ(0, result.max_exit_status());
@@ -205,7 +204,7 @@ TEST(Hooker, BadOutput)
HookResult result(hooker.perform_hook(Hook("several_hooks_output_bad")
.grab_output(Hook::AllowedOutputValues()),
- make_null_shared_ptr()));
+ nullptr));
EXPECT_EQ("two", result.output());
EXPECT_EQ(99, result.max_exit_status());