Regression tests for PR #3258 (#3259)

This commit is contained in:
keinflue 2021-05-17 03:35:16 +00:00 committed by GitHub
parent 30ef6db24c
commit e93f8f140e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,12 @@ void validCode(int argInt, GHashTableIter * hash_table_iter, GHashTable * hash_t
g_hash_table_iter_replace(hash_table_iter, g_strdup("test"));
g_hash_table_insert(hash_table, g_strdup("key"), g_strdup("value"));
g_hash_table_replace(hash_table, g_strdup("key"), g_strdup("value"));
// NULL is handled graciously
char* str = g_strdup(NULL);
if(g_strcmp0(str, NULL) || g_strcmp0(NULL, str))
printf("%s", str);
g_free(str);
}
void g_malloc_test()