27 ASSERT_EQ(block->getName(), defaultBlockName);
28 ASSERT_EQ(block->getName(IO::INPUT, (
size_t) 0), defaultInputChannelName);
29 ASSERT_EQ(block->getName(IO::OUTPUT, (
size_t) 0), defaultOutputChannelName);
34 ASSERT_EQ(block->getCount(IO::INPUT), (
size_t) 1);
35 ASSERT_EQ(block->getCount(IO::OUTPUT), (
size_t) 1);
40 ASSERT_EQ(block->getDescription(IO::INPUT, (
size_t) 0), defaultInputChannelDescription);
41 ASSERT_EQ(block->getDescription(IO::OUTPUT, (
size_t) 0), defaultOutputChannelDescription);
46 double defaultval = 0.0;
47 EXPECT_DOUBLE_EQ(defaultval, block->getValue(IO::INPUT, (
size_t) 1));
48 EXPECT_DOUBLE_EQ(defaultval, block->getValue(IO::OUTPUT, (
size_t) 1));
53 double defaultval = 0.0;
54 for(
size_t i = 0; i < 2; ++i)
56 EXPECT_DOUBLE_EQ(defaultval, block->input(i));
62 "OUTPUT CHANNEL DESCRIPTION",
67 "INPUT CHANNEL DESCRIPTION",
72 block1channels[0] = outputchannel;
73 block1channels[1] = inputchannel;
75 block2channels[0] = outputchannel;
76 block2channels[1] = inputchannel;
84 EXPECT_DOUBLE_EQ(1.0, block->input(0));
86 EXPECT_DOUBLE_EQ(2.0, block->input(0));
95 double defaultval = 0.0;
98 for(
size_t i = 0; i < 2; ++i)
100 EXPECT_DOUBLE_EQ(defaultval, const_block->
output(i));
108 EXPECT_EQ(connector, connector->getInstance());
118 "OUTPUT CHANNEL DESCRIPTION",
123 "INPUT CHANNEL DESCRIPTION",
127 block1channels[0] = outputchannel;
128 block1channels[1] = inputchannel;
130 block2channels[0] = outputchannel;
131 block2channels[1] = inputchannel;
139 EXPECT_FALSE(connector->connected(block1, (
size_t) 0, block2, (
size_t) 0));
140 EXPECT_FALSE(connector->connected(block2, (
size_t) 0, block1, (
size_t) 0));
141 connector->connect(block1, (
size_t) 0, block2, (
size_t) 0);
142 connector->connect(block2, (
size_t) 0, block1, (
size_t) 0);
143 EXPECT_TRUE(connector->connected(block1, (
size_t) 0, block2, (
size_t) 0));
144 EXPECT_TRUE(connector->connected(block2, (
size_t) 0, block1, (
size_t) 0));
145 connector->disconnect(block1, (
size_t) 0, block2, (
size_t) 0);
146 connector->disconnect(block2, (
size_t) 0, block1, (
size_t) 0);
147 EXPECT_FALSE(connector->connected(block1, (
size_t) 0, block2, (
size_t) 0));
148 EXPECT_FALSE(connector->connected(block2, (
size_t) 0, block1, (
size_t) 0));
151 delete[] block1channels;
152 delete[] block2channels;