From 2008e41eff90f23ee1af6f850a91597ea1a4a84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E6=9E=9A=E5=B0=8Fjava?= <270570320@qq.com> Date: Fri, 5 Mar 2021 10:42:26 +0800 Subject: [PATCH] =?UTF-8?q?update=20kmaplib/HashMap=5Ftest.c.=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=B1=BB=E5=81=9A=E4=BA=86=E5=B0=8F=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8Cwindows=E4=B8=AD=E6=96=B9=E4=BE=BF=E8=A7=82=E5=AF=9F?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kmaplib/HashMap_test.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kmaplib/HashMap_test.c b/kmaplib/HashMap_test.c index cad4e54..4ba27e6 100644 --- a/kmaplib/HashMap_test.c +++ b/kmaplib/HashMap_test.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include "xiphashmap.h" static void name_print( int idx, char * key, void * value); @@ -21,7 +21,7 @@ int main() int i = 0; int length = 15; char tmpname[51]; - /*初始化put*/ + /*鍒濆鍖杙ut*/ for ( i = 0; i < length ; i++) { strcpy( tmpname, name[i]); @@ -29,29 +29,29 @@ int main() XipHashmapPut( hashmap, tmpname, tmpname, strlen(tmpname)+1); } - /*打印和检查*/ + /*鎵撳嵃鍜屾鏌*/ XipHashmapPrint(hashmap, NULL); - /*查看set是否好用*/ + /*鏌ョ湅set鏄惁濂界敤*/ printf("GetSize--[%d]", XipHashmapSize(hashmap, NULL, NULL, NULL, NULL, NULL)); XipHashmapPut( hashmap, "panzi", "iceskyiceskyicesky", strlen("iceskyiceskyicesky")+1); XipHashmapPrint(hashmap, name_print); printf("GetNum--[%d]", XipHashmapNum(hashmap)); printf("GetSize--[%d]", XipHashmapSize(hashmap, NULL, NULL, NULL, NULL, NULL)); - /*查看get是否好用*/ + /*鏌ョ湅get鏄惁濂界敤*/ for ( i = 0; i< length; i++) printf("get(%15s): %15s\n", name[i], (char *)XipHashmapGet(hashmap, name[i])); XipHashmapPrint(hashmap, NULL); - /*查看remove是否好用*/ + /*鏌ョ湅remove鏄惁濂界敤*/ printf("remove(%15s): %d\n", "lionsoul", XipHashmapRemove(hashmap, "lionsoul")); XipHashmapPrint(hashmap, NULL); - /*查看destory*/ + /*鏌ョ湅destory*/ XipHashmapDestory(hashmap); hashmap = NULL; - + system("pause"); return 0; }