LCOV - code coverage report
Current view: top level - dpdklibs/unittest - Conversions_test.cxx (source / functions) Coverage Total Hit
Test: code.result Lines: 100.0 % 6 6
Test Date: 2025-12-21 13:07:08 Functions: 100.0 % 2 2

            Line data    Source code
       1              : /**
       2              :  * @file Conversions_test.cxx 
       3              :  *
       4              :  * Test the converter functions written for strings vs. Big Endians vs. Little Endians, etc...
       5              :  *
       6              :  * This is part of the DUNE DAQ Application Framework, copyright 2020.
       7              :  * Licensing/copyright details are in the COPYING file that you should have
       8              :  * received with this code.
       9              :  */
      10              : 
      11              : #include "dpdklibs/ipv4_addr.hpp"
      12              : #include "dpdklibs/udp/IPV4UDPPacket.hpp"
      13              : 
      14              : #define BOOST_TEST_MODULE Conversions_test // NOLINT
      15              : 
      16              : #include "TRACE/trace.h"
      17              : #include "boost/test/unit_test.hpp"
      18              : 
      19              : #include <string>
      20              : 
      21              : using namespace dunedaq::dpdklibs;
      22              : 
      23              : BOOST_AUTO_TEST_SUITE(Conversions_test)
      24              : 
      25            2 : BOOST_AUTO_TEST_CASE(IpAddressConversions)
      26              : {
      27            1 :   std::string ipaddr_str = "10.20.30.40"; // non-const b/c of IpAddr constructor
      28              : 
      29            1 :   IpAddr ipaddr_object(ipaddr_str);
      30              : 
      31            1 :   BOOST_REQUIRE_EQUAL(ipaddr_object.addr_bytes[0], 10);
      32            1 :   BOOST_REQUIRE_EQUAL(ipaddr_object.addr_bytes[2], 30);
      33              :   
      34            1 : }
      35              : 
      36              : BOOST_AUTO_TEST_SUITE_END()
        

Generated by: LCOV version 2.0-1