Browse Source

Initial test_channeltls.c

Andrea Shepard 10 years ago
parent
commit
50d5fb87bd
4 changed files with 24 additions and 3 deletions
  1. 3 3
      src/test/Makefile.nmake
  2. 1 0
      src/test/include.am
  3. 2 0
      src/test/test.c
  4. 18 0
      src/test/test_channeltls.c

+ 3 - 3
src/test/Makefile.nmake

@@ -11,9 +11,9 @@ LIBS = ..\..\..\build-alpha\lib\libevent.lib \
  ws2_32.lib advapi32.lib shell32.lib \
  crypt32.lib gdi32.lib user32.lib
 
-TEST_OBJECTS = test.obj test_addr.obj test_channel.obj test_containers.obj \
-	test_controller_events.ogj test_crypto.obj test_data.obj test_dir.obj \
-	test_microdesc.obj test_pt.obj test_util.obj test_config.obj \
+TEST_OBJECTS = test.obj test_addr.obj test_channel.obj test_channeltls.obj \
+	test_containers.obj test_controller_events.obj test_crypto.obj test_data.obj \
+	test_dir.obj test_microdesc.obj test_pt.obj test_util.obj test_config.obj \
 	test_cell_formats.obj test_relay.obj test_replay.obj \
 	test_introduce.obj tinytest.obj test_hs.obj
 

+ 1 - 0
src/test/include.am

@@ -21,6 +21,7 @@ src_test_test_SOURCES = \
 	src/test/test_buffers.c \
 	src/test/test_cell_formats.c \
 	src/test/test_channel.c \
+	src/test/test_channeltls.c \
 	src/test/test_circuitlist.c \
 	src/test/test_circuitmux.c \
 	src/test/test_containers.c \

+ 2 - 0
src/test/test.c

@@ -1310,6 +1310,7 @@ extern struct testcase_t status_tests[];
 extern struct testcase_t routerset_tests[];
 extern struct testcase_t router_tests[];
 extern struct testcase_t channel_tests[];
+extern struct testcase_t channeltls_tests[];
 extern struct testcase_t relay_tests[];
 
 static struct testgroup_t testgroups[] = {
@@ -1344,6 +1345,7 @@ static struct testgroup_t testgroups[] = {
   { "status/" , status_tests },
   { "routerset/" , routerset_tests },
   { "channel/", channel_tests },
+  { "channeltls/", channeltls_tests },
   { "relay/" , relay_tests },
   END_OF_GROUPS
 };

+ 18 - 0
src/test/test_channeltls.c

@@ -0,0 +1,18 @@
+/* Copyright (c) 2013, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#define TOR_CHANNEL_INTERNAL_
+#include "or.h"
+#include "channel.h"
+#include "channeltls.h"
+/* For init/free stuff */
+#include "scheduler.h"
+
+/* Test suite stuff */
+#include "test.h"
+#include "fakechans.h"
+
+struct testcase_t channeltls_tests[] = {
+  END_OF_TESTCASES
+};
+