refactor: 重构日志系统,统一日志接口并添加map工具
This commit is contained in:
17
tests/test-map.c
Normal file
17
tests/test-map.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "utils/logging-map.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
Map *map = map_create(0, sizeof(int));
|
||||
|
||||
const char *keys[] = {"key1", "key2", "key3", "key4", "key5"};
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
map_put(map, keys[i], &i);
|
||||
}
|
||||
|
||||
map_destroy(map);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user