PPI: Checkin of first compiling (yet not working) version
[senf.git] / Packets / Packet.test.cc
index 60b2bd2..a33ccd4 100644 (file)
 
 // Custom includes
 #include <sstream>
-#include "PacketType.hh"
-#include "PacketRegistry.hh"
-#include "Packet.hh"
-#include "ParseInt.hh"
-#include "PacketParser.hh"
-#include "DataPacket.hh"
+#include "Packets.hh"
 
 #include <boost/test/auto_unit_test.hpp>
 #include <boost/test/test_tools.hpp>
@@ -105,8 +100,8 @@ namespace {
     typedef BarPacketType::packet BarPacket;
 
     namespace reg {
-        senf::PacketRegistry<RegTag>::RegistrationProxy<FooPacketType> registerFoo(1u);
-        senf::PacketRegistry<RegTag>::RegistrationProxy<BarPacketType> registerBar(2u);
+        senf::PacketRegistry<RegTag>::RegistrationProxy<FooPacket> registerFoo(1u);
+        senf::PacketRegistry<RegTag>::RegistrationProxy<BarPacket> registerBar(2u);
     }
 
 }
@@ -164,8 +159,8 @@ BOOST_AUTO_UNIT_TEST(packet)
 
     BOOST_CHECK( packet.factory() == FooPacket::factory() );
 
-    senf::Packet::byte data[] = { 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                  0x81, 0x82, 0x83 };
+    senf::PacketData::byte data[] = { 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                                      0x81, 0x82, 0x83 };
 
     BarPacket::createAfter(packet,data);
     BOOST_REQUIRE( packet.next() );
@@ -194,7 +189,7 @@ BOOST_AUTO_UNIT_TEST(packet)
 
 BOOST_AUTO_UNIT_TEST(concretePacket)
 {
-    FooPacket::byte data[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
+    senf::PacketData::byte data[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
 
     BOOST_CHECK_EQUAL( FooPacket::create().size(), 4u );
     BOOST_CHECK_EQUAL( FooPacket::create(FooPacket::noinit).size(), 0u );