aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcathook <cat.hook31894@gmail.com>2013-11-26 00:08:47 +0800
committercathook <cat.hook31894@gmail.com>2013-11-26 02:41:11 +0800
commitdce7caffc3d84ec29ce4f91cfee0a389531e7064 (patch)
treedae513172fe3bc6e7ddf4ff69c5046137b508e09
parente59edaee63c1b4a955cc07bc6c2b9c5e7e830790 (diff)
downloadctl-dce7caffc3d84ec29ce4f91cfee0a389531e7064.tar.gz
ctl-dce7caffc3d84ec29ce4f91cfee0a389531e7064.tar.zst
ctl-dce7caffc3d84ec29ce4f91cfee0a389531e7064.zip
test...
-rw-r--r--test/test.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/test.c b/test/test.c
new file mode 100644
index 0000000..ce4dfed
--- /dev/null
+++ b/test/test.c
@@ -0,0 +1,46 @@
+#include "vector.h"
+
+#include <stdio.h>
+
+enum TestID{
+ TEST_UTILITY,
+ TEST_VECTOR,
+ END
+} test_id;
+
+const char *test_name[2] = {
+ "utility",
+ "vector"
+};
+
+const char **func_name[2] = {
+ {"ctl_malloc()", "ctl_realloc()", "ctl_free()", "ctl_swap"},
+ {}
+};
+
+
+
+int main(){
+ while(1){
+ printf("Which object do you want to test?\n");
+ for(test_id = 0; test_id < END; test_id++){
+ printf(" %d) %s\n", test_id, test_name[test_id]);
+ }
+ printf("Input (-1 to exit): ");
+ int k;
+ scanf("%d", &k);
+ if(k < 0 || k >= END)
+ return 0;
+ test_id = (TestID)k;
+ switch(test_id){
+ case TEST_UTILITY:
+
+ break;
+ case TEST_VECTOR:
+
+ break;
+ default:
+ printf("Sorry, this part has not completed...\n");
+ }
+ }
+}