mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[GSOC 2011 Unit Testing] Test KVPFrame.
Author: Muslim Chochlov git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20937 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
1ed80def56
commit
ed13b73866
@ -1610,6 +1610,27 @@ kvp_value_glist_to_string(const GList *list)
|
||||
return tmp2;
|
||||
}
|
||||
|
||||
/* struct for kvp frame static funtion testing*/
|
||||
void init_static_test_pointers( void );
|
||||
|
||||
KvpFrame* ( *p_get_trailer_make )( KvpFrame *frame, const char *key_path, char **end_key );
|
||||
gchar* ( *p_kvp_value_glist_to_string )( const GList *list );
|
||||
KvpFrame* ( *p_get_or_make )( KvpFrame *fr, const char * key );
|
||||
const KvpFrame* ( *p_kvp_frame_get_frame_or_null_slash_trash )( const KvpFrame *frame, char *key_path );
|
||||
const KvpFrame* ( *p_get_trailer_or_null )( const KvpFrame * frame, const char * key_path, char **end_key );
|
||||
|
||||
void
|
||||
init_static_test_pointers( void )
|
||||
{
|
||||
p_get_trailer_make = get_trailer_make;
|
||||
p_kvp_value_glist_to_string = kvp_value_glist_to_string;
|
||||
p_get_or_make = get_or_make;
|
||||
p_kvp_frame_get_frame_or_null_slash_trash = kvp_frame_get_frame_or_null_slash_trash;
|
||||
p_get_trailer_or_null = get_trailer_or_null;
|
||||
}
|
||||
|
||||
/* ----- */
|
||||
|
||||
static gchar*
|
||||
kvp_value_to_bare_string(const KvpValue *val);
|
||||
|
||||
|
@ -12,12 +12,14 @@ test_qof_SOURCES = \
|
||||
test-qof.c \
|
||||
test-qofbook.c \
|
||||
test-qofinstance.c \
|
||||
test-kvp_frame.c \
|
||||
test-qofsession.c
|
||||
|
||||
test_qof_HEADERSS = \
|
||||
$(top_srcdir)/${MODULEPATH}/qofbook.h \
|
||||
$(top_srcdir)/${MODULEPATH}/qofinstance.h \
|
||||
$(top_srcdir)/${MODULEPATH/}qofsession.h
|
||||
$(top_srcdir)/${MODULEPATH}/kvp_frame.h \
|
||||
$(top_srcdir)/${MODULEPATH}/qofsession.h
|
||||
|
||||
TEST_PROGS += test-qof
|
||||
|
||||
|
1485
src/libqof/qof/test/test-kvp_frame.c
Normal file
1485
src/libqof/qof/test/test-kvp_frame.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -27,6 +27,7 @@
|
||||
|
||||
extern void test_suite_qofbook();
|
||||
extern void test_suite_qofinstance();
|
||||
extern void test_suite_kvp_frame();
|
||||
extern void test_suite_qofsession();
|
||||
|
||||
int
|
||||
@ -40,6 +41,7 @@ main (int argc,
|
||||
|
||||
test_suite_qofbook();
|
||||
test_suite_qofinstance();
|
||||
test_suite_kvp_frame();
|
||||
test_suite_qofsession();
|
||||
|
||||
return g_test_run( );
|
||||
|
Loading…
Reference in New Issue
Block a user