Beispiel #1
0
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);
}
Beispiel #2
0
gboolean gncEmployeeIsDirty (const GncEmployee *employee)
{
    if (!employee) return FALSE;
    return (qof_instance_get_dirty_flag(employee)
            || gncAddressIsDirty (employee->addr));
}