static void test_string_fcn (GncAddress *address, const char *message, void (*set) (GncAddress *, const char *str), const char * (*get)(const GncAddress *)) { char const *str = get_random_string (); do_test (!gncAddressIsDirty (address), "test if start dirty"); set (address, str); do_test (gncAddressIsDirty (address), "test dirty later"); do_test (g_strcmp0 (get (address), str) == 0, message); gncAddressClearDirty (address); }
static void gncEmployeeOnDone (QofInstance *inst) { GncEmployee *employee = (GncEmployee *) inst; gncAddressClearDirty (employee->addr); }