Packets: added documentation about necessary operator<< member for annotations
[senf.git] / Examples / psi2tsModule / psi2ts.test.cc
index 000dc74..434cf5f 100644 (file)
     \brief psi2ts unit tests */
 
 // Custom includes
-#include "senf/PPI/DebugModules.hh"
-#include "senf/PPI/Setup.hh"
+#include <senf/PPI/DebugModules.hh>
+#include <senf/PPI/Setup.hh>
 #include <senf/Packets/MPEGDVBBundle/MPESection.hh>
 #include <senf/Packets/MPEGDVBBundle/TransportPacket.hh>
 #include "psi2ts.hh"
 
-#include "../../Utils/auto_unit_test.hh"
+#include <senf/Utils/auto_unit_test.hh>
 #include <boost/test/test_tools.hpp>
 #include <boost/lambda/lambda.hpp>
 
@@ -46,6 +46,8 @@ void check_transportpacket_header(senf::TransportPacket tsPacket, bool pusi, uns
     BOOST_CHECK_EQUAL( tsPacket->transport_scrmbl_ctrl(),     0x0u                                   );
     BOOST_CHECK_EQUAL( tsPacket->adaptation_field_ctrl(),     0x1u                                   );
     BOOST_CHECK_EQUAL( tsPacket->continuity_counter(),        counter                                );
+    if (pusi)
+        BOOST_CHECK_EQUAL( tsPacket->pointer_field(),         0x0u                                   );
         
 }
 
@@ -56,7 +58,7 @@ bool equal_elements(InputIterator first, InputIterator last, const T& value)
 }
         
 
-BOOST_AUTO_UNIT_TEST(one_section_to_one_transportpacket)
+SENF_AUTO_UNIT_TEST(one_section_to_one_transportpacket)
 {
     senf::ppi::module::debug::ActiveSource source;
     senf::ppi::module::debug::PassiveSink sink;
@@ -88,7 +90,7 @@ BOOST_AUTO_UNIT_TEST(one_section_to_one_transportpacket)
             0xffu));
 }
 
-BOOST_AUTO_UNIT_TEST(one_section_to_two_transportpackets)
+SENF_AUTO_UNIT_TEST(one_section_to_two_transportpackets)
 {
     senf::ppi::module::debug::ActiveSource source;
     senf::ppi::module::debug::PassiveSink sink;
@@ -99,7 +101,7 @@ BOOST_AUTO_UNIT_TEST(one_section_to_two_transportpackets)
     senf::ppi::connect( psi2ts, sink);
     senf::ppi::init();
     
-    std::string sec_data ( 184, 0x42);
+    std::string sec_data ( 183, 0x42);
     std::string sec_data2 ( "psi2ts_test: one_section_to_two_transportpackets");
     sec_data.append( sec_data2);
     senf::Packet sec_packet (senf::DataPacket::create(sec_data));
@@ -111,6 +113,7 @@ BOOST_AUTO_UNIT_TEST(one_section_to_two_transportpackets)
     senf::TransportPacket ts_packet = sink.pop_front().as<senf::TransportPacket>();
     check_transportpacket_header( ts_packet, true, PID, 1);
     senf::PacketData & ts_payload_data1 = ts_packet.next().data();
+
     BOOST_CHECK( equal_elements( ts_payload_data1.begin(), ts_payload_data1.end(), 0x42));
     
     ts_packet = sink.pop_front().as<senf::TransportPacket>();
@@ -127,7 +130,7 @@ BOOST_AUTO_UNIT_TEST(one_section_to_two_transportpackets)
             0xffu));
 }
 
-BOOST_AUTO_UNIT_TEST(many_sections_to_many_transportpackets)
+SENF_AUTO_UNIT_TEST(many_sections_to_many_transportpackets)
 {
     senf::ppi::module::debug::ActiveSource source;
     senf::ppi::module::debug::PassiveSink sink;