GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
test-aqb.c
1 /********************************************************************
2  * testmain.c: GLib g_test test execution file. *
3  * Copyright 2011 John Ralls <[email protected]> *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, contact: *
17  * *
18  * Free Software Foundation Voice: +1-617-542-5942 *
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20  * Boston, MA 02110-1301, USA [email protected] *
21 \********************************************************************/
22 
23 
24 /* This is a template test program. Copy it to the test sudirectory and rename it test_modulename.c. (Use the same modulename that you gave Makefile.am in the same directory.
25 Write and link other test files */
26 #include <glib.h>
27 #include "config.h"
28 #include <qof.h>
30 #include "gnc-module/gnc-module.h"
31 #include "engine/gnc-engine.h"
32 #include <engine/TransLog.h>
33 
34 void test_qofsession_aqb_kvp( void );
35 
36 int
37 main (int argc,
38  char *argv[])
39 {
40  qof_init(); /* Initialize the GObject system */
41  qof_log_init_filename_special("stderr"); /* Init the log system */
42  g_test_init ( &argc, &argv, NULL ); /* initialize test program */
43  qof_log_set_level("gnc", G_LOG_LEVEL_DEBUG);
44  g_test_bug_base("https://bugzilla.gnome.org/show_bug.cgi?id="); /* init the bugzilla URL */
45  /* Disable the transaction log */
47 
48  gnc_module_system_init();
49  gnc_engine_init_static(argc, argv);
50  qof_load_backend_library ("../../../backend/xml/.libs/",
51  "gncmod-backend-xml");
52 
53  /* Add test functions and suites. See
54  * http://library.gnome.org/devel/glib/stable/glib-Testing.html for
55  * details. Unfortunately, GLib-Testing doesn't provide the automatic
56  * registration features of more sophisticated frameworks. */
57  g_test_add_func ("/src/import-export/aqb/kvp", test_qofsession_aqb_kvp);
58 
59  return g_test_run();
60 }
61 
62 
void qof_log_set_level(QofLogModule module, QofLogLevel level)
void xaccLogDisable(void)
Definition: TransLog.c:93
void qof_log_init_filename_special(const char *log_to_filename)
void gnc_engine_init_static(int argc, char **argv)
Definition: gnc-engine.c:147
All type declarations for the whole Gnucash engine.
gboolean qof_load_backend_library(const gchar *directory, const gchar *module_name)
Load a QOF-compatible backend shared library.
API for the transaction logger.
load and save data to files
void qof_init(void)
Initialise the Query Object Framework.