Пример #1
0
void 
LookupVisitorTests::BuildDataTest()
{
  CLookupVisitor v;
  m_pChannels->foreach(v);

  CChannel::doEvents(0.5);	// Connect and data should be there.

  CBuildChannelData  bv;
  m_pChannels->foreach(bv);	// Collect channel data.

  CBuildChannelData::ChannelItemIterator  p = bv.begin();
  int i = 0;
  while(p != bv.end()) {
    EQ(Names[i], p->first);
    CBuildChannelData::ChannelData info = p->second;
    ASSERT(info.m_sValue != "");
    // ASSERT(info.m_sUnits != "");
    ASSERT(info.m_Updated != 0);
    p++;
    i++;
  }
}
Пример #2
0
void
LookupVisitorTests::TestLookup()
{
  CLookupVisitor v;
  m_pChannels->foreach(v);
  CChannel::doEvents(0.5);

  // By now, everyone should be connected.

  CChannelList::ChannelIterator p = m_pChannels->begin();
  while(p != m_pChannels->end()) {
    EQMSG((*p)->getName(), true, (*p)->isConnected());

    p++;
  }
}