test: fix issues in test to fix memleak
This commit is contained in:
parent
6d84807cc8
commit
ce694d1eed
@ -112,11 +112,7 @@ spec("hashtable") {
|
|||||||
value *value = value_new(1337);
|
value *value = value_new(1337);
|
||||||
check(value_hashtable_insert(hashtable, key, value) == 0);
|
check(value_hashtable_insert(hashtable, key, value) == 0);
|
||||||
check(value != NULL, "value should not be NULL");
|
check(value != NULL, "value should not be NULL");
|
||||||
//value_destroy(&value);
|
value_destroy(&value);
|
||||||
free(value);
|
|
||||||
free(value);
|
|
||||||
value_new(1234);
|
|
||||||
free(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
it("should return 0 with NULL as this param") {
|
it("should return 0 with NULL as this param") {
|
||||||
|
|||||||
@ -135,7 +135,7 @@ spec("list") {
|
|||||||
it("should return 0 with NULL as this param") {
|
it("should return 0 with NULL as this param") {
|
||||||
value *value = value_new(1);
|
value *value = value_new(1);
|
||||||
check(value_list_unshift(NULL, value) == 0, "return should not be 0");
|
check(value_list_unshift(NULL, value) == 0, "return should not be 0");
|
||||||
//value_destroy(&value);
|
value_destroy(&value);
|
||||||
}
|
}
|
||||||
|
|
||||||
it("should return 0 with NULL as valueElement param") {
|
it("should return 0 with NULL as valueElement param") {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user