diff options
author | Daniel Burrows <dburrows@debian.org> | 2010-07-10 12:25:43 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2010-07-10 12:25:43 -0700 |
commit | 750e7bfefb17cb188d62ec722fde5c66c41f5b6c (patch) | |
tree | 82a901269ed19c795ecdfea400b678e65d48d2c1 /src/cmdline | |
parent | 419dd29079d522c7666f720385ec78c6ca9fad9b (diff) | |
download | aptitude-750e7bfefb17cb188d62ec722fde5c66c41f5b6c.tar.gz |
Use Mock to implement terminal_with_combined_output.
Diffstat (limited to 'src/cmdline')
-rw-r--r-- | src/cmdline/mocks/terminal.cc | 5 | ||||
-rw-r--r-- | src/cmdline/mocks/terminal.h | 6 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/cmdline/mocks/terminal.cc b/src/cmdline/mocks/terminal.cc index 0e6ded85..624bc394 100644 --- a/src/cmdline/mocks/terminal.cc +++ b/src/cmdline/mocks/terminal.cc @@ -123,11 +123,6 @@ namespace aptitude { } - shared_ptr<terminal_with_combined_output> terminal_with_combined_output::create() - { - return make_shared<terminal_with_combined_output>(); - } - combining_terminal_output::combining_terminal_output() { } diff --git a/src/cmdline/mocks/terminal.h b/src/cmdline/mocks/terminal.h index 547ddf72..a866bacb 100644 --- a/src/cmdline/mocks/terminal.h +++ b/src/cmdline/mocks/terminal.h @@ -116,7 +116,7 @@ namespace aptitude /** \brief Interface for objects that emit terminal output as a * sequence of string writes. */ - class terminal_with_combined_output + class terminal_with_combined_output : public aptitude::util::mocks::Mock<terminal_with_combined_output> { terminal_with_combined_output(); @@ -125,6 +125,8 @@ namespace aptitude friend boost::shared_ptr<terminal_with_combined_output> boost::make_shared<terminal_with_combined_output>(); + MOCK_FRIENDS(); + public: virtual ~terminal_with_combined_output(); @@ -135,8 +137,6 @@ namespace aptitude // If the terminal would flush, but there's no text to flush, // this isn't invoked. MOCK_METHOD1(output, void(const std::wstring &)); - - static boost::shared_ptr<terminal_with_combined_output> create(); }; /** \brief Interface for objects that can receive calls to |