summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Burrows <dburrows@debian.org>2010-07-10 11:42:15 -0700
committerDaniel Burrows <dburrows@debian.org>2010-07-10 11:42:15 -0700
commitbf38ffb4cd670fa60c7fa842cbfc1fe3bdcb924a (patch)
tree2dca5d4207516dcd719070c5aa21c801abe39d6b
parent999360e26876e4e15734735c2826748ce830ba37 (diff)
downloadaptitude-bf38ffb4cd670fa60c7fa842cbfc1fe3bdcb924a.tar.gz
Give mocks::terminal_input::prompt_for_input a default return value.
Otherwise tests will abort if it's invoked unexpectedly, instead of registering a failure and continuing.
-rw-r--r--src/cmdline/mocks/terminal.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmdline/mocks/terminal.cc b/src/cmdline/mocks/terminal.cc
index 4b797938..da57b25c 100644
--- a/src/cmdline/mocks/terminal.cc
+++ b/src/cmdline/mocks/terminal.cc
@@ -37,9 +37,12 @@ namespace aptitude
{
namespace mocks
{
-
terminal_input::terminal_input()
{
+ // Make sure the program doesn't abort if there's an
+ // unexpected invocation of prompt_for_input().
+ ON_CALL(*this, prompt_for_input(_))
+ .WillByDefault(Return(std::wstring()));
}
shared_ptr<terminal_input> terminal_input::create()