GnuCash  4.11-137-g155922540d+
gmock-gnc-prefs.h
1 #ifndef GMOCK_GNC_PREFS_H
2 #define GMOCK_GNC_PREFS_H
3 
4 #include <gmock/gmock.h>
5 
6 extern "C"
7 {
8 #include <gnc-prefs.h>
9 }
10 
11 
12 // mock up class implementing preferences backend (see struct PrefBackend in gnc-prefs-p.h)
14 {
15 public:
16  MOCK_METHOD2(get_bool, gboolean(const gchar *, const gchar *));
17  MOCK_METHOD2(get_int, gint(const gchar *, const gchar *));
18  MOCK_METHOD2(get_int64, gint64(const gchar *, const gchar *));
19  MOCK_METHOD2(get_float, gdouble(const gchar *, const gchar *));
20  MOCK_METHOD2(get_string, gchar*(const gchar *, const gchar *));
21  MOCK_METHOD2(get_enum, gint(const gchar *, const gchar *));
22  MOCK_METHOD4(get_coords, void(const gchar *, const gchar *, gdouble *, gdouble *));
23 };
24 
29 void gmock_gnc_prefs_set_backend(MockPrefsBackend *backend);
30 
31 #endif
Generic api to store and retrieve preferences.