mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
stub out test for accounting periods
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6167 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
0a45ba7b55
commit
2e0a6d197f
@ -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 \
|
||||
|
63
src/engine/test/test-period.c
Normal file
63
src/engine/test/test-period.c
Normal file
@ -0,0 +1,63 @@
|
||||
|
||||
/* test file created by Linas Vepstas <linas@linas.org>
|
||||
* December 2001
|
||||
* License: GPL
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <glib.h>
|
||||
#include <guile/gh.h>
|
||||
#include <time.h>
|
||||
|
||||
#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());
|
||||
}
|
Loading…
Reference in New Issue
Block a user