summaryrefslogtreecommitdiff
path: root/src/channel.cc
diff options
context:
space:
mode:
authordeva <deva>2011-03-01 19:19:02 +0000
committerdeva <deva>2011-03-01 19:19:02 +0000
commite190d38057892b69246391841b234a368bc2b4ad (patch)
tree34f946bc1c3b86997d4cd45e63c433ef07b36486 /src/channel.cc
parentc393edc920f8ee126d1bced3500b6bc1ecf86f83 (diff)
MAJOR rewrite of the internals. New input/output 'plugin' system. Still a lot missing.
Diffstat (limited to 'src/channel.cc')
-rw-r--r--src/channel.cc26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/channel.cc b/src/channel.cc
index 93a0715..941847a 100644
--- a/src/channel.cc
+++ b/src/channel.cc
@@ -29,5 +29,29 @@
Channel::Channel(std::string name)
{
this->name = name;
- this->port = NULL;
+ num = NO_CHANNEL;
}
+
+#ifdef TEST_CHANNEL
+//deps:
+//cflags:
+//libs:
+#include "test.h"
+
+TEST_BEGIN;
+
+Channel c1;
+TEST_EQUAL_STR(c1.name, "", "Empty name?");
+TEST_EQUAL_INT(c1.num, NO_CHANNEL, "No physical channel assigned?");
+
+Channel c2("ch2");
+TEST_EQUAL_STR(c2.name, "ch2", "Nonempty name?");
+TEST_EQUAL_INT(c2.num, NO_CHANNEL, "No physical channel assigned?");
+
+Channels channels;
+channels.push_back(c1);
+channels.push_back(c2);
+
+TEST_END;
+
+#endif/*TEST_CHANNEL*/