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