GRAS_LOG_NEW_DEFAULT_CATEGORY(test,"Logging specific to this test");
int main(int argc,char *argv[]) {
- gras_dynar_t *d;
+ gras_dynar_t d;
gras_error_t errcode;
int cpt,cursor;
double d1,d2;
gras_assert0(FALSE,
"Damnit, there is something in the empty dynar");
}
- gras_dynar_free(d);
+ gras_dynar_free(&d);
+ gras_dynar_free(&d);
INFO0("==== Push/shift 5000 doubles");
d=gras_dynar_new(sizeof(double),NULL);
"The retrieved value is not the same than the injected one (%f!=%f)",
d1,d2);
}
- gras_dynar_free(d);
+ gras_dynar_free(&d);
+ gras_dynar_free(&d);
INFO0("==== Unshift/pop 5000 doubles");
"The retrieved value is not the same than the injected one (%f!=%f)",
d1,d2);
}
- gras_dynar_free(d);
+ gras_dynar_free(&d);
+ gras_dynar_free(&d);
"The retrieved value is not the same than the injected one at the end (%f!=%f)",
d1,d2);
}
- gras_dynar_free(d);
+ gras_dynar_free(&d);
+ gras_dynar_free(&d);
INFO0("==== Push 5000 double, remove 2000-4000. free the rest");
"Remove a bad value. Got %f, expected %f",
d2,d1);
}
- gras_dynar_free(d);
+ gras_dynar_free(&d);
+ gras_dynar_free(&d);
gras_exit();
return 0;