summaryrefslogtreecommitdiff
path: root/src/cmdline
diff options
context:
space:
mode:
authorDaniel Burrows <Daniel Burrows Daniel_Burrows@alumni.brown.edu>2010-06-09 18:10:08 -0700
committerDaniel Burrows <Daniel Burrows Daniel_Burrows@alumni.brown.edu>2010-06-09 18:10:08 -0700
commit3c2a05f0fa0e9cbfc786d1079674ce43f630b104 (patch)
tree005a7e5cab79fc22620f5b7a28eeb6be38e35da9 /src/cmdline
parentcb4864073f4d2d533c2cf19d443d97914e3d6de5 (diff)
downloadaptitude-3c2a05f0fa0e9cbfc786d1079674ce43f630b104.tar.gz
Add a simple mock of the transient message class.
Diffstat (limited to 'src/cmdline')
-rw-r--r--src/cmdline/mocks/Makefile.am3
-rw-r--r--src/cmdline/mocks/SConscript8
-rw-r--r--src/cmdline/mocks/transient_message.h45
3 files changed, 55 insertions, 1 deletions
diff --git a/src/cmdline/mocks/Makefile.am b/src/cmdline/mocks/Makefile.am
index ae933790..841c0a18 100644
--- a/src/cmdline/mocks/Makefile.am
+++ b/src/cmdline/mocks/Makefile.am
@@ -6,6 +6,7 @@ libcmdline_mocks_a_SOURCES = \
teletype.cc \
teletype.h \
terminal.cc \
- terminal.h
+ terminal.h \
+ transient_message.h
EXTRA_DIST = SConscript \ No newline at end of file
diff --git a/src/cmdline/mocks/SConscript b/src/cmdline/mocks/SConscript
index feae0fee..89ba80f9 100644
--- a/src/cmdline/mocks/SConscript
+++ b/src/cmdline/mocks/SConscript
@@ -4,6 +4,14 @@ Import('programs_env')
srcs = map(File, [
])
+programs_env.Dist(
+ 'teletype.cc',
+ 'teletype.h',
+ 'terminal.cc',
+ 'terminal.h',
+ 'transient_message.h',
+ )
+
programs_env.Dist('Makefile.am', 'SConscript')
Return('srcs')
diff --git a/src/cmdline/mocks/transient_message.h b/src/cmdline/mocks/transient_message.h
new file mode 100644
index 00000000..a62c24b7
--- /dev/null
+++ b/src/cmdline/mocks/transient_message.h
@@ -0,0 +1,45 @@
+/** \file transient_message.h */ // -*-c++-*-
+
+
+// Copyright (C) 2010 Daniel Burrows
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; see the file COPYING. If not, write to
+// the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+// Boston, MA 02111-1307, USA.
+
+#ifndef APTITUDE_CMDLINE_MOCKS_TRANSIENT_MESSAGE_H
+#define APTITUDE_CMDLINE_MOCKS_TRANSIENT_MESSAGE_H
+
+// Local includes:
+#include <cmdline/transient_message.h>
+
+// System includes:
+#include <gmock/gmock.h>
+
+namespace aptitude
+{
+ namespace cmdline
+ {
+ namespace mocks
+ {
+ class transient_message : public cmdline::transient_message
+ {
+ public:
+ MOCK_METHOD1(set_text, void(const std::wstring &));
+ };
+ }
+ }
+}
+
+#endif // APTITUDE_CMDLINE_MOCKS_TRANSIENT_MESSAGE_H