Index: /trunk/include/cf_base.h
===================================================================
--- /trunk/include/cf_base.h	(revision 104)
+++ /trunk/include/cf_base.h	(revision 105)
@@ -5,6 +5,4 @@
  *
  * @remarks 기본 정의
- *
- * @example test.c
  *
  * @mainpage
Index: /trunk/test/log.c
===================================================================
--- /trunk/test/log.c	(revision 104)
+++ /trunk/test/log.c	(revision 105)
@@ -4,12 +4,47 @@
  */
 #include "cf_log.h"
+#include "cf_thread.h"
+#include "cf_debug.h"
+
 #include <stdio.h>
+
+CF_Mutex globalMutex;
+
+#define LOG_MT		1
+
+int test_log_mt (void * arg)
+{
+	static int cnt = 0;
+	int i = 0;
+	int th = 0;
+	
+	if (CF_Mutex_Lock (&globalMutex) < 0) { // for critical section
+		// error
+	}
+	th = cnt++;
+	if (CF_Mutex_Unlock (&globalMutex) < 0) { // for critical section
+		// error
+	}
+
+	CF_DEBUG_PRINT (stderr, "created %dth thread\n", th);
+
+	for (i = 0 ; i < 100000 ; i++)
+	{
+		CF_Log_Write (LOG_MT, "LOG_MT", "[%d] multi-threadedlogging test %d\n", th, i);
+	}
+
+	CF_DEBUG_PRINT (stderr, "end %dth thread\n", th);
+
+	return 0;
+}
 
 int main (void)
 {
 	int			i, j;
-	char		logname[16] = {0x00,};
+	char		idname[16] = {0x00,};
+	CF_Thread	tid[10];
 
-	if (CF_Log_Initialize (10, CF_LOG_NO_LEVEL) < 0)
+	/* initialize */
+	if (CF_Log_Initialize (10, 2) < 0)
 	{
 		fprintf (stderr, "failed to init. log\n");
@@ -19,6 +54,6 @@
 	for (i = 0 ; i < 10 ; i++)
 	{
-		sprintf (logname, "logid%d.txt", i);
-		if (CF_Log_Open (i, logname, CF_LOG_NO_BUFFER) < 0)
+		sprintf (idname, "logid%d.txt", i);
+		if (CF_Log_Open (i, idname, CF_LOG_NO_BUFFER) < 0)
 			fprintf (stderr, "failed to open log\n");
 	}
@@ -37,4 +72,38 @@
 	}
 
+	/* mt {{{ */
+	if (CF_Log_Open (LOG_MT, "log_mt.txt", CF_LOG_DEFAULT_BUFFER) < 0)
+		CF_DEBUG_PRINT (stderr, "create log ctx error\n");
+
+	if (CF_Log_SetMT (LOG_MT, CF_TRUE) < 0)
+		CF_DEBUG_PRINT (stderr, "set multi-threading mode error\n");
+
+	if (CF_Mutex_Create (&globalMutex) < 0) {
+		// error
+	}
+
+	for (i = 0 ; i < 10 ; i++)
+	{
+		if (CF_Thread_Create (&tid[i], test_log_mt, &i) < 0)
+		{
+			CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", i);
+			return -2;
+		}
+	}
+
+	for (i = 0 ; i < 10 ; i++)
+	{
+		if (CF_Thread_Join (&tid[i]) < 0)
+			CF_DEBUG_PRINT (stderr, "failed to join %dth thread\n", i);
+		if (CF_Thread_Release (&tid[i]) < 0)
+			CF_DEBUG_PRINT (stderr, "failed to release %dth thread\n", i);
+	}
+
+	if (CF_Mutex_Destory (&globalMutex) < 0) {
+		// error
+	}
+	/* }}} mt */
+
+	/* finalize */
 	CF_Log_Finalize ();
 
Index: /trunk/test/makefile
===================================================================
--- /trunk/test/makefile	(revision 104)
+++ /trunk/test/makefile	(revision 105)
@@ -8,14 +8,6 @@
 # env
 #----------------------------------------------------------
-FILES			=	\
-					test			\
-
-TARGET_NAME		= test
-
 TARGET_PATH		= ../_build
 OBJ_PATH		= ../_obj
-TARGET			= $(TARGET_PATH)/$(TARGET_NAME).$(EXT_EXECUTE)
-SRCS			= $(addsuffix .$(SOURCE_TYPE),$(FILES))
-OBJS			= $(addprefix $(OBJ_PATH)/,$(addsuffix .o,$(FILES)))
 
 INCLUDES		= -I../include
@@ -27,5 +19,5 @@
 # label
 #----------------------------------------------------------
-all: dep $(TARGET)
+all: dep
 	@echo ========== Complete CHEROXY compilation ==========
 dep: $(OBJ_PATH) $(TARGET_PATH) $(LIB_CF) 
@@ -37,4 +29,7 @@
 $(LIB_CF): dummy
 	cd ../src; make all;
+
+test:
+	make $(shell ls *.c | awk -F. '{ print $$1 }')
 
 %: %.c
Index: /trunk/test/socket.c
===================================================================
--- /trunk/test/socket.c	(revision 105)
+++ /trunk/test/socket.c	(revision 105)
@@ -0,0 +1,176 @@
+#include "cf_socket.h"
+#include "cf_debug.h"
+#include "cf_log.h"
+#include "cf_thread.h"
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+
+#define LOG_SOCKET		0
+#define THREAD_POOL		1
+#define PORT			1234
+
+int socket_echo_server (void * arg)
+{
+	int srvsock = *((int *)arg);
+	int clntsock = 0;
+	int recvd = 0;
+	char buf[1024] = {0x00,};
+	int i = 0;
+
+	/*------------------------------------------------------------*/
+	clntsock = CF_Socket_Accept (srvsock);
+	if (clntsock < 0)
+	{
+		CF_DEBUG_PRINT (stderr, "failed to accept on server\n");
+		return -1;
+	}
+	CF_Log_Write (LOG_SOCKET, "SERVER", "accepted\n");
+
+	for (i = 0 ; i < 5 ; i++)
+	{
+		if ((recvd = CF_Socket_Recv (clntsock, buf, sizeof (buf))) < 0)
+		{
+			CF_DEBUG_PRINT (stderr, "failed to recv on server\n");
+			return -2;
+		}
+		CF_Log_Write (LOG_SOCKET, "SERVER", "recv {%s}\n", buf);
+		CF_DEBUG_PRINT (stderr, "[SERVER] recv {%s}\n", buf);
+
+		if (CF_Socket_Send (clntsock, buf, recvd) < 0)
+		{
+			return -3;
+		}
+		CF_Log_Write (LOG_SOCKET, "SERVER", "resp {%s}\n", buf);
+		CF_DEBUG_PRINT (stderr, "[SERVER] resp {%s}\n", buf);
+	}
+
+	CF_Socket_Close (clntsock);
+
+	return 0;
+	/*------------------------------------------------------------*/
+}
+
+int socket_echo_client (void * arg)
+{
+	int sock = 0;
+	int recvd = 0;
+	char buf[1024] = {0x00,};
+	int i = 0;
+
+	sprintf (buf, "...wow ? is it succeed ?");
+
+	/*------------------------------------------------------------*/
+	sock = CF_Socket_Connect ("localhost", PORT);
+	if (sock < 0)
+	{
+		CF_DEBUG_PRINT (stderr, "failed to connect on client\n");
+		return -1;
+	}
+	CF_Log_Write (LOG_SOCKET, "CLIENT", "connected\n");
+
+	for (i = 0 ; i < 5 ; i++)
+	{
+		if (CF_Socket_Send (sock, buf, sizeof (buf)) < 0)
+		{
+			CF_DEBUG_PRINT (stderr, "failed to send on client %d\n", errno);
+			return -2;
+		}
+		CF_Log_Write (LOG_SOCKET, "CLIENT", "sent {%s}\n", buf);
+		CF_DEBUG_PRINT (stderr, "[CLIENT] sent {%s}\n", buf);
+
+		memset (buf, 0x00, sizeof (buf));
+
+		if ((recvd = CF_Socket_Recv (sock, buf, sizeof (buf))) < 0)
+		{
+			CF_DEBUG_PRINT (stderr, "failed to recv on client\n");
+			return -3;
+		}
+		CF_Log_Write (LOG_SOCKET, "CLIENT", "recv {%s}\n", buf);
+		CF_DEBUG_PRINT (stderr, "[CLIENT] recv {%s}\n", buf);
+	}
+
+	CF_Socket_Close (sock);
+
+	return 0;
+	/*------------------------------------------------------------*/
+}
+
+int main ()
+{
+	CF_Thread stid[THREAD_POOL];
+	CF_Thread ctid[THREAD_POOL];
+
+	int sock = 0;
+	int iter = 0;
+
+	/*------------------------------------------------------------*/
+	if (CF_Log_Initialize (1, CF_LOG_NO_LEVEL) < 0)
+	{
+		fprintf (stderr, "failed to init. log\n");
+		return -1;
+	}
+
+	if (CF_Log_Open (LOG_SOCKET, "socket.txt", CF_LOG_DEFAULT_BUFFER) < 0)
+		CF_DEBUG_PRINT (stderr, "failed to open log\n");
+
+	CF_Log_Write (LOG_SOCKET, "LOG_MULTITHREAD", "multi-threaded logging test with socket\n");
+
+	if (CF_Socket_Initialize () < 0)
+	{
+		CF_DEBUG_PRINT (stderr, "failed to initialize socket\n");
+		return -2;
+	}
+	CF_Log_Write (LOG_SOCKET, "SOCKET", "socket initialized\n");
+
+	sock = CF_Socket_Server (PORT, 5);
+	if (sock < 0)
+	{
+		CF_DEBUG_PRINT (stderr, "failed to ready server %d\n", sock);
+		return -3;
+	}
+	CF_Log_Write (LOG_SOCKET, "SOCKET", "socket ready\n");
+
+	for (iter = 0 ; iter < THREAD_POOL ; iter++)
+	{
+		if (CF_Thread_Create (&stid[iter], socket_echo_server, &sock) < 0)
+		{
+			CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", iter);
+			return -4;
+		}
+		CF_Log_Write (LOG_SOCKET, "SOCKET", "create server thread-%d\n", iter);
+	}
+
+	for (iter = 0 ; iter < THREAD_POOL ; iter++)
+	{
+		if (CF_Thread_Create (&ctid[iter], socket_echo_client, &sock) < 0)
+		{
+			CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", iter);
+			return -5;
+		}
+		CF_Log_Write (LOG_SOCKET, "SOCKET", "create client thread-%d\n", iter);
+	}
+
+	for (iter = 0 ; iter < THREAD_POOL ; iter++)
+	{
+		CF_Thread_Join (&ctid[iter]);
+		CF_Thread_Release (&ctid[iter]);
+
+		CF_Thread_Join (&stid[iter]);
+		CF_Thread_Release (&stid[iter]);
+
+		CF_Log_Write (LOG_SOCKET, "SOCKET", "join server thread-%d\n", iter);
+	}
+
+	CF_Socket_Close (sock);
+
+	CF_Socket_Finalize ();
+
+	CF_Log_Close (LOG_SOCKET);
+
+	CF_Log_Finalize ();
+	/*------------------------------------------------------------*/
+
+	return 0;
+}
Index: unk/test/socket_client.c
===================================================================
--- /trunk/test/socket_client.c	(revision 104)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/**
- * @file	socket_client.c
- * @author	myusgun <myusgun@gmail.com>
- */
-#include "cf_socket.h"
-#include <stdio.h>
-#include <string.h>
-
-int main (void) {
-	int sock = 0;
-	int result = 0;
-	char buf[] = "http://unsigned.kr";
-	unsigned short port = 12345;
-
-	if (CF_Socket_Initialize () < 0) {
-		// error
-	}
-	sock = CF_Socket_Connect ("localhost", port);
-	if (sock < 0) {
-		fprintf (stderr, "error : connect (%d)\n", sock);
-	}
-
-	result = CF_Socket_Send (sock, buf, sizeof (buf));
-	if (result < 0) {
-		fprintf (stderr, "error : send (%d)\n", sock);
-	}
-	memset (buf, 0x00, strlen (buf));
-
-	result = CF_Socket_Recv (sock, buf, sizeof (buf));
-	if (result < 0) {
-		fprintf (stderr, "error : recv (%d)\n", result);
-	}
-	fprintf (stderr, "client recv : %s(%d)\n", buf, result);
-
-	CF_Socket_Close (sock);
-	CF_Socket_Finalize ();
-
-	return 0;
-}
Index: unk/test/socket_server.c
===================================================================
--- /trunk/test/socket_server.c	(revision 104)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/**
- * @file	socket_server.c
- * @author	myusgun <myusgun@gmail.com>
- */
-#include "cf_socket.h"
-#include <stdio.h>
-
-int main (void) {
-	int srvsock = 0;
-	int clntsock = 0;
-	unsigned short port = 12345;
-	int result = 0;
-	char buf[1024] = {0x00,};
-
-	if (CF_Socket_Initialize () < 0) {
-		// error
-	}
-	srvsock = CF_Socket_Server (port, 5);
-	if (srvsock < 0) {
-		fprintf (stderr, "error : server (%d)\n", srvsock);
-	}
-
-	clntsock = CF_Socket_Accept (srvsock);
-	if (clntsock < 0) {
-		fprintf (stderr, "error : accept (%d)\n", clntsock);
-	}
-
-	result = CF_Socket_Recv (clntsock, buf, sizeof (buf));
-	if (result < 0) {
-		fprintf (stderr, "error : recv (%d)\n", result);
-	}
-	fprintf (stderr, "server recv : %s(%d)\n", buf, result);
-
-	result = CF_Socket_Send (clntsock, buf, result);
-	if (result < 0) {
-		fprintf (stderr, "error : send (%d)\n", result);
-	}
-
-	CF_Socket_Close (srvsock);
-	CF_Socket_Finalize ();
-
-	return 0;
-}
Index: unk/test/test.c
===================================================================
--- /trunk/test/test.c	(revision 104)
+++ 	(revision )
@@ -1,425 +1,0 @@
-/**
- * @file	test.c
- * @author	myusgun <myusgun@gmail.com>
- */
-#include "cf_file.h"
-#include "cf_log.h"
-#include "cf_socket.h"
-#include "cf_thread.h"
-#include "cf_codec.h"
-
-/*
- * before including "cf_debug.h",
- * if _DEBUG is defined, the debugging code will be act.
- */
-#include "cf_debug.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#define THREAD_POOL	5
-#define PORT		1234
-
-CF_Mutex			globalMutex;
-
-#define LOG_SOCKET		0
-#define LOG_MT			1
-
-const char * file = "./log.txt";
-
-int		test_log_mt			(void * arg);
-void	test_log			(const char * message);
-void	test_file			(const char * message);
-void	test_callstack3		(void);
-void	test_callstack2		(void);
-void	test_callstack1		(void);
-int		socket_echo_server	(void * arg);
-int		socket_echo_client	(void * arg);
-void	test_socket			(void);
-void	test_codec			(void);
-
-int main (int argc, char ** argv)
-{
-	CF_DEBUG_INITIALIZE;
-
-	// 1
-	CF_DEBUG_PRINT (stderr, " == LOG TEST ==\n");
-	test_log ("LOG_TEST");
-
-	// 2
-	CF_DEBUG_PRINT (stderr, " == FILE READ TEST ==\n");
-	test_file ("FILE_READ_TEST");
-
-	// 3
-	CF_DEBUG_PRINT (stderr, " == CALLSTACK TEST ==\n");
-	CF_DEBUG_BEGIN_FUNCTION;
-	test_callstack1 ();
-	CF_DEBUG_END_FUNCTION;
-
-	// 4
-	CF_DEBUG_PRINT (stderr, " == MULTI-THREADED SOCKET TEST ==\n");
-	test_socket ();
-
-	// 5
-	CF_DEBUG_PRINT (stderr, " == CODEC TEST ==\n");
-	test_codec ();
-
-	CF_DEBUG_PRINT (stderr, " == END OF TEST ==\n");
-
-	CF_DEBUG_FINALIZE;
-
-	return 0;
-}
-
-int test_log_mt (void * arg)
-{
-	static int cnt = 0;
-	int i = 0;
-	int th = 0;
-	
-	if (CF_Mutex_Lock (&globalMutex) < 0) { // for critical section
-		// error
-	}
-	th = cnt++;
-	if (CF_Mutex_Unlock (&globalMutex) < 0) { // for critical section
-		// error
-	}
-
-	CF_DEBUG_PRINT (stderr, "created %dth thread\n", th);
-
-	for (i = 0 ; i < 100000 ; i++)
-	{
-		CF_Log_Write (LOG_MT, "LOG_MT", "[%d] multi-threadedlogging test %d\n", th, i);
-	}
-
-	CF_DEBUG_PRINT (stderr, "end %dth thread\n", th);
-
-	return 0;
-}
-
-void test_log (const char * message)
-{
-	int			i, j;
-	char		idname[16] = {0x00,};
-	CF_Thread	tid[10];
-
-	/* initialize */
-	if (CF_Log_Initialize (10, 5) < 0)
-	{
-		fprintf (stderr, "failed to init. log\n");
-		return ;
-	}
-
-	for (i = 0 ; i < 10 ; i++)
-	{
-		sprintf (idname, "logid%d.txt", i);
-		if (CF_Log_Open (i, idname, CF_LOG_NO_BUFFER) < 0)
-			fprintf (stderr, "failed to open log\n");
-	}
-
-	for (i = 0 ; i < 10 ; i++)
-	{
-		for (j = 0 ; j < 10000 ; j++)
-		{
-			int result = CF_Log_Write (i, "LOG_ID_TEST", "turn %d\n", j); 
-			if (result < 0)
-				fprintf (stderr, "failed to write log %d\n", result);
-		}
-
-		if (CF_Log_Close (i) < 0)
-			fprintf (stderr, "failed to close log\n");
-	}
-
-	/* mt {{{ */
-	if (CF_Log_Open (LOG_MT, "log_mt.txt", CF_LOG_DEFAULT_BUFFER) < 0)
-		CF_DEBUG_PRINT (stderr, "create log ctx error\n");
-
-	if (CF_Log_SetMT (LOG_MT, CF_TRUE) < 0)
-		CF_DEBUG_PRINT (stderr, "set multi-threading mode error\n");
-
-	if (CF_Mutex_Create (&globalMutex) < 0) {
-		// error
-	}
-
-	for (i = 0 ; i < 10 ; i++)
-	{
-		if (CF_Thread_Create (&tid[i], test_log_mt, &i) < 0)
-		{
-			CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", i);
-			return ;
-		}
-	}
-
-	for (i = 0 ; i < 10 ; i++)
-	{
-		if (CF_Thread_Join (&tid[i]) < 0)
-			CF_DEBUG_PRINT (stderr, "failed to join %dth thread\n", i);
-		if (CF_Thread_Release (&tid[i]) < 0)
-			CF_DEBUG_PRINT (stderr, "failed to release %dth thread\n", i);
-	}
-
-	if (CF_Mutex_Destory (&globalMutex) < 0) {
-		// error
-	}
-	/* }}} mt */
-
-	/* finalize */
-	CF_Log_Finalize ();
-}
-
-void test_file (const char * message)
-{
-	int		fd = 0;
-	char	buffer[128] = {0x00,};
-
-	fd = CF_File_Open (file, CF_FILE_READ);
-	if (fd < 0)
-		CF_DEBUG_PRINT (stderr, "what the ... file open ?\n");
-
-	if (CF_File_Read (fd, buffer, sizeof (buffer)) < 0)
-		CF_DEBUG_PRINT (stderr, "what the ... file read ?\n");
-	else
-		CF_DEBUG_PRINT_BIN (stdout, (unsigned char *)buffer,
-									sizeof (buffer),
-									"-- %d bytes of %d bytes\n",
-									sizeof (buffer),
-									CF_File_GetSize (file));
-
-	CF_File_Close (fd);
-}
-
-void test_callstack3 (void)
-{
-	// ...
-
-	CF_DEBUG_BEGIN_FUNCTION;
-	CF_DEBUG_PRINT_CALLSTACK (stderr);
-	CF_DEBUG_END_FUNCTION;
-
-	// ...
-}
-void test_callstack2 (void)
-{
-	// ...
-
-	CF_DEBUG_BEGIN_FUNCTION;
-	test_callstack3 ();
-	CF_DEBUG_END_FUNCTION;
-
-	// ...
-}
-void test_callstack1 (void)
-{
-	// ...
-
-	CF_DEBUG_BEGIN_FUNCTION;
-	test_callstack2 ();
-	CF_DEBUG_END_FUNCTION;
-
-	// ...
-}
-
-int socket_echo_server (void * arg)
-{
-	int srvsock = *((int *)arg);
-	int clntsock = 0;
-	int recvd = 0;
-	char buf[1024] = {0x00,};
-	int i = 0;
-
-	/*------------------------------------------------------------*/
-	clntsock = CF_Socket_Accept (srvsock);
-	if (clntsock < 0)
-	{
-		CF_DEBUG_PRINT (stderr, "failed to accept on server\n");
-		return -1;
-	}
-	CF_Log_Write (LOG_SOCKET, "SERVER", "accepted\n");
-
-	for (i = 0 ; i < 5 ; i++)
-	{
-		if ((recvd = CF_Socket_Recv (clntsock, buf, sizeof (buf))) < 0)
-		{
-			CF_DEBUG_PRINT (stderr, "failed to recv on server\n");
-			return -2;
-		}
-		CF_Log_Write (LOG_SOCKET, "SERVER", "recv {%s}\n", buf);
-		CF_DEBUG_PRINT (stderr, "[SERVER] recv {%s}\n", buf);
-
-		if (CF_Socket_Send (clntsock, buf, recvd) < 0)
-		{
-			return -3;
-		}
-		CF_Log_Write (LOG_SOCKET, "SERVER", "resp {%s}\n", buf);
-		CF_DEBUG_PRINT (stderr, "[SERVER] resp {%s}\n", buf);
-	}
-
-	CF_Socket_Close (clntsock);
-
-	return 0;
-	/*------------------------------------------------------------*/
-}
-
-int socket_echo_client (void * arg)
-{
-	int sock = 0;
-	int recvd = 0;
-	char buf[1024] = {0x00,};
-	int i = 0;
-
-	sprintf (buf, "...wow ? is it succeed ?");
-
-	/*------------------------------------------------------------*/
-	sock = CF_Socket_Connect ("localhost", PORT);
-	if (sock < 0)
-	{
-		CF_DEBUG_PRINT (stderr, "failed to connect on client\n");
-		return -1;
-	}
-	CF_Log_Write (LOG_SOCKET, "CLIENT", "connected\n");
-
-	for (i = 0 ; i < 5 ; i++)
-	{
-		if (CF_Socket_Send (sock, buf, sizeof (buf)) < 0)
-		{
-			CF_DEBUG_PRINT (stderr, "failed to send on client %d\n", errno);
-			return -2;
-		}
-		CF_Log_Write (LOG_SOCKET, "CLIENT", "sent {%s}\n", buf);
-		CF_DEBUG_PRINT (stderr, "[CLIENT] sent {%s}\n", buf);
-
-		memset (buf, 0x00, sizeof (buf));
-
-		if ((recvd = CF_Socket_Recv (sock, buf, sizeof (buf))) < 0)
-		{
-			CF_DEBUG_PRINT (stderr, "failed to recv on client\n");
-			return -3;
-		}
-		CF_Log_Write (LOG_SOCKET, "CLIENT", "recv {%s}\n", buf);
-		CF_DEBUG_PRINT (stderr, "[CLIENT] recv {%s}\n", buf);
-	}
-
-	CF_Socket_Close (sock);
-
-	return 0;
-	/*------------------------------------------------------------*/
-}
-
-void test_socket (void)
-{
-	CF_Thread stid[THREAD_POOL];
-	CF_Thread ctid[THREAD_POOL];
-
-	int sock = 0;
-	int iter = 0;
-
-	/*------------------------------------------------------------*/
-	if (CF_Log_Initialize (1, CF_LOG_NO_LEVEL) < 0)
-	{
-		fprintf (stderr, "failed to init. log\n");
-		return ;
-	}
-
-	if (CF_Log_Open (LOG_SOCKET, "socket.txt", CF_LOG_DEFAULT_BUFFER) < 0)
-		CF_DEBUG_PRINT (stderr, "failed to open log\n");
-
-	CF_Log_Write (LOG_SOCKET, "LOG_MULTITHREAD", "multi-threaded logging test with socket\n");
-
-	if (CF_Socket_Initialize () < 0)
-	{
-		CF_DEBUG_PRINT (stderr, "failed to initialize socket\n");
-		return ;
-	}
-	CF_Log_Write (LOG_SOCKET, "SOCKET", "socket initialized\n");
-
-	sock = CF_Socket_Server (PORT, 5);
-	if (sock < 0)
-	{
-		CF_DEBUG_PRINT (stderr, "failed to ready server %d\n", sock);
-		return ;
-	}
-	CF_Log_Write (LOG_SOCKET, "SOCKET", "socket ready\n");
-
-	for (iter = 0 ; iter < THREAD_POOL ; iter++)
-	{
-		if (CF_Thread_Create (&stid[iter], socket_echo_server, &sock) < 0)
-		{
-			CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", iter);
-			return ;
-		}
-		CF_Log_Write (LOG_SOCKET, "SOCKET", "create server thread-%d\n", iter);
-	}
-
-	for (iter = 0 ; iter < THREAD_POOL ; iter++)
-	{
-		if (CF_Thread_Create (&ctid[iter], socket_echo_client, &sock) < 0)
-		{
-			CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", iter);
-			return ;
-		}
-		CF_Log_Write (LOG_SOCKET, "SOCKET", "create client thread-%d\n", iter);
-	}
-
-	for (iter = 0 ; iter < THREAD_POOL ; iter++)
-	{
-		CF_Thread_Join (&ctid[iter]);
-		CF_Thread_Release (&ctid[iter]);
-
-		CF_Thread_Join (&stid[iter]);
-		CF_Thread_Release (&stid[iter]);
-
-		CF_Log_Write (LOG_SOCKET, "SOCKET", "join server thread-%d\n", iter);
-	}
-
-	CF_Socket_Close (sock);
-
-	CF_Socket_Finalize ();
-
-	CF_Log_Close (LOG_SOCKET);
-
-	CF_Log_Finalize ();
-	/*------------------------------------------------------------*/
-}
-
-void test_codec (void)
-{
-	char data[] = "ONE OK ROCK - Nothing Helps";
-
-	char encode[512] = {0x00,};
-	unsigned char bin[512] = {0x00,};
-	size_t length = 0;
-
-	/* hex */
-	CF_DEBUG_PRINT (stderr, "------------------- codec/hex ----------------\n");
-	CF_DEBUG_PRINT (stderr, "data   : %s\n", data);
-	CF_DEBUG_PRINT (stderr, "= Convert binary to hex =\n");
-	CF_Codec_Hex_Encode ((unsigned char *)data, strlen (data), encode);
-	CF_DEBUG_PRINT (stderr, "hex    : %s\n", encode);
-	CF_DEBUG_PRINT_BIN (stderr, (unsigned char *) data, strlen (data), "data   : %s\n", data);
-
-	CF_DEBUG_PRINT (stderr, "= Convert hex to binary =\n");
-	if (CF_Codec_Hex_Decode (encode, bin, &length) < 0) {
-		// error
-	}
-	else
-		CF_DEBUG_PRINT_BIN (stderr, bin, length, "bin    : %s\n", bin);
-
-	memset (bin   , 0x00, sizeof (bin));
-	memset (encode, 0x00, sizeof (encode));
-	length = 0;
-
-	/* base64 */
-	CF_DEBUG_PRINT (stderr, "----------------- codec/base64 ---------------\n");
-	CF_DEBUG_PRINT (stderr, "data   : %s\n", data);
-	CF_DEBUG_PRINT (stderr, "= Convert binary to base64 =\n");
-	CF_Codec_Base64_Encode ((unsigned char *)data, strlen (data), encode);
-	CF_DEBUG_PRINT (stderr, "base64 : %s\n", encode);
-
-	CF_DEBUG_PRINT (stderr, "= Convert base64 to binary =\n");
-	if (CF_Codec_Base64_Decode (encode, bin, &length) < 0) {
-		// error
-	}
-	else
-		CF_DEBUG_PRINT_BIN (stderr, bin, length, "bin    : %s\n", bin);
-}
Index: /trunk/windows/test/test.vcproj
===================================================================
--- /trunk/windows/test/test.vcproj	(revision 104)
+++ /trunk/windows/test/test.vcproj	(revision 105)
@@ -174,5 +174,25 @@
 			>
 			<File
-				RelativePath="..\..\test\test.c"
+				RelativePath="..\..\test\codec.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\test\debug.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\test\file.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\test\log.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\test\socket.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\test\thread.c"
 				>
 			</File>
