void test_suite_gnc_csv_model (void) { // GNC_TEST_ADD (suitename, "parse date with year", Fixture, NULL, setup, test_parse_date_with_year, teardown); // GNC_TEST_ADD (suitename, "parse date without year", Fixture, NULL, setup, test_parse_date_without_year, teardown); GNC_TEST_ADD_FUNC (suitename, "parse date", test_parse_date); GNC_TEST_ADD_FUNC (suitename, "gnc csv new parse data", test_gnc_csv_new_parse_data); // GNC_TEST_ADD (suitename, "gnc csv parse data free", Fixture, NULL, setup, test_gnc_csv_parse_data_free, teardown); // GNC_TEST_ADD (suitename, "gnc csv convert encoding", Fixture, NULL, setup, test_gnc_csv_convert_encoding, teardown); GNC_TEST_ADD (suitename, "gnc csv load file", Fixture, NULL, setup, test_gnc_csv_load_file, teardown); GNC_TEST_ADD (suitename, "gnc csv parse from file", Fixture, samplefile1, setup_one_file, test_gnc_csv_parse_from_file, teardown); GNC_TEST_ADD (suitename, "parse comma", Fixture, comma_separated, setup, test_gnc_csv_parse_comma_sep, teardown); GNC_TEST_ADD (suitename, "parse semicolon", Fixture, semicolon_separated, setup, test_gnc_csv_parse_semicolon_sep, teardown); // GNC_TEST_ADD (suitename, "trans property free", Fixture, NULL, setup, test_trans_property_free, teardown); // GNC_TEST_ADD (suitename, "trans property set", Fixture, NULL, setup, test_trans_property_set, teardown); // GNC_TEST_ADD (suitename, "trans property list free", Fixture, NULL, setup, test_trans_property_list_free, teardown); // GNC_TEST_ADD (suitename, "trans property list add", Fixture, NULL, setup, test_trans_property_list_add, teardown); // GNC_TEST_ADD (suitename, "trans add split", Fixture, NULL, setup, test_trans_add_split, teardown); // GNC_TEST_ADD (suitename, "trans property list verify essentials", Fixture, NULL, setup, test_trans_property_list_verify_essentials, teardown); // GNC_TEST_ADD (suitename, "gnc csv parse to trans", Fixture, NULL, setup, test_gnc_csv_parse_to_trans, teardown); }
/* Assert macros that you can use in your test functions. "cmp" is a * comparison operator, one of ==, !=, <, >, <=, >=. * * g_assert( boolean_expression ) * g_assert_not_reached() * g_assert_cmpstr( gchar *s1, cmp, gchar *s2 ) * g_assert_cmpint( int s1, cmp, int s2 ) * g_assert_cmpuint( unsigned int s1, cmp, unsigned int s2 ) * g_assert_cmphex( unsigned int s1, cmp, unsigned int s2 ) * g_assert_cmpfloat( double s1, cmp, double s2 ) * g_assert_no_error( GError *err ) * g_assert_error( GError *err, GQuark domain, gint code ) * * You can also emit arbitrary messages into the test report with * g_test_message( const char* format, ... ) */ void test_suite_module1 (void) { Datatype data = something(); GNC_TEST_ADD_FUNC (suitename, "Test Name 1", test_function); { gchar *testpath = g_strdup_printf ("%s/Test Name 2", suitename); g_test_add_data_func( suitename, (gconstpointer)(&data), test_function_with_data ); g_free (testpath); } GNC_TEST_ADD (suitename, "Test Name 3", Fixture, data, setup, test_function_with_fixture, teardown); /* Other conditionals are g_test_quick(), g_test_slow(), and * g_test_thorough() */ if ( g_test_perf() ) { GNC_TEST_ADD_FUNC (suitename, "Test Name 4", test_performance_func); } }
void test_suite_gncInvoice ( void ) { GNC_TEST_ADD( suitename, "post", Fixture, NULL, setup, test_invoice_post, teardown ); }
void test_suite_gncEntry ( void ) { GNC_TEST_ADD( suitename, "basics", Fixture, NULL, setup, test_entry_basics, teardown ); }
void test_suite_qofobject (void) { GNC_TEST_ADD( suitename, "qof object register", Fixture, NULL, setup, test_qof_object_register, teardown ); GNC_TEST_ADD( suitename, "qof object lookup", Fixture, NULL, setup, test_qof_object_lookup, teardown ); GNC_TEST_ADD( suitename, "qof object get type label", Fixture, NULL, setup, test_qof_object_get_type_label, teardown ); GNC_TEST_ADD( suitename, "qof object printable", Fixture, NULL, setup, test_qof_object_printable, teardown ); GNC_TEST_ADD( suitename, "qof object book begin", Fixture, NULL, setup, test_qof_object_book_begin, teardown ); GNC_TEST_ADD( suitename, "qof object book end", Fixture, NULL, setup, test_qof_object_book_end, teardown ); GNC_TEST_ADD( suitename, "qof object is dirty", Fixture, NULL, setup, test_qof_object_is_dirty, teardown ); GNC_TEST_ADD( suitename, "qof object mark clean", Fixture, NULL, setup, test_qof_object_mark_clean, teardown ); GNC_TEST_ADD( suitename, "qof object new instance", Fixture, NULL, setup, test_qof_object_new_instance, teardown ); GNC_TEST_ADD( suitename, "qof object compliance", Fixture, NULL, setup, test_qof_object_compliance, teardown ); GNC_TEST_ADD( suitename, "qof object foreach type", Fixture, NULL, setup, test_qof_object_foreach_type, teardown ); GNC_TEST_ADD( suitename, "qof object foreach", Fixture, NULL, setup, test_qof_object_foreach, teardown ); GNC_TEST_ADD( suitename, "qof object foreach sorted", Fixture, NULL, setup, test_qof_object_foreach_sorted, teardown ); }