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