diff --git a/src/engine/test/Makefile.am b/src/engine/test/Makefile.am index 34a18ab543..d44a0e9ae7 100644 --- a/src/engine/test/Makefile.am +++ b/src/engine/test/Makefile.am @@ -24,6 +24,7 @@ TESTS = \ test-commodities \ test-date \ test-group-vs-book \ + test-period \ test-query \ test-resolve-file-path \ test-split-vs-account \ @@ -45,6 +46,7 @@ noinst_PROGRAMS = \ test-freq-spec \ test-group-vs-book \ test-load-engine \ + test-period \ test-query \ test-resolve-file-path \ test-scm-query \ diff --git a/src/engine/test/test-period.c b/src/engine/test/test-period.c new file mode 100644 index 0000000000..7fdfac3270 --- /dev/null +++ b/src/engine/test/test-period.c @@ -0,0 +1,63 @@ + +/* test file created by Linas Vepstas + * December 2001 + * License: GPL + */ + +#include +#include +#include +#include + +#include "Period.h" +#include "gnc-book.h" +#include "gnc-book-p.h" +#include "gnc-module.h" +#include "test-stuff.h" +#include "test-engine-stuff.h" + + + +static void +run_test (void) +{ + AccountGroup *grp; + GNCBook *book; + Timespec ts; + +int ok = 1; + if (!ok) + { + failure ("its borken"); + } + + book = gnc_book_new (); + if (!book) + { + failure("book not created"); + exit(get_rv()); + } + + grp = get_random_group (book); + if(!grp) + { + failure("group not created"); + exit(get_rv()); + } + + gnc_book_set_group (book, grp); + + + success ("periods work but wern't really tested yet"); +} + +int +main (int argc, char **argv) +{ + run_test (); + + success ("periods aren't realy tested yet"); + + print_test_results(); + exit(get_rv()); +}