add input mode unit-test

This commit is contained in:
liuwentan
2022-12-05 23:21:18 +08:00
parent ea4c1ba4c3
commit 6d18cf0f36
24 changed files with 519 additions and 347 deletions

View File

@@ -51,10 +51,10 @@ struct maat_kv_pair* maat_kv_pair_new(const char* key, size_t keylen, int value)
void maat_kv_pair_free(struct maat_kv_pair* kv)
{
free(kv->key);
FREE(kv->key);
kv->key = NULL;
free(kv);
FREE(kv);
}
struct maat_kv_store* maat_kv_store_new(void)
@@ -77,7 +77,7 @@ void maat_kv_store_free(struct maat_kv_store* store)
maat_kv_pair_free(kv);
}
free(store);
FREE(store);
}
int maat_kv_register_unNull(struct maat_kv_store* store, const char* key, size_t keylen, int value)