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

            Line data    Source code
       1              : /**
       2              :  * @file DataStoreFactory_test.cxx Test application that tests and demonstrates
       3              :  * the functionality of the mechanisms to allocate DataStores via the factory.
       4              :  *
       5              :  * This is part of the DUNE DAQ Application Framework, copyright 2020.
       6              :  * Licensing/copyright details are in the COPYING file that you should have
       7              :  * received with this code.
       8              :  */
       9              : 
      10              : #include "dfmodules/DataStore.hpp"
      11              : 
      12              : #define BOOST_TEST_MODULE DataStoreFactory_test // NOLINT
      13              : 
      14              : #include "boost/test/unit_test.hpp"
      15              : 
      16              : #include <memory>
      17              : 
      18              : using namespace dunedaq::dfmodules;
      19              : 
      20              : BOOST_AUTO_TEST_SUITE(DataStoreFactory_test)
      21              : 
      22            2 : BOOST_AUTO_TEST_CASE(invalid_request)
      23              : {
      24              : 
      25              :   // we want to pass an invalid DataStore type and see if we get an exception
      26            6 :   BOOST_CHECK_THROW(make_data_store("dummy", "dummy", nullptr, "dummy_writer"), DataStoreCreationFailed);
      27              : 
      28            1 : }
      29              : 
      30              : #if 0
      31              : BOOST_AUTO_TEST_CASE(valid_request)
      32              : {
      33              : 
      34              :   nlohmann::json conf ;
      35              :   conf["name"] = "test" ;
      36              : 
      37              :   // we want to ask for a valid Data Store type
      38              :   auto ds = make_data_store( "TrashCanDataStore", conf, "test" ) ;
      39              : 
      40              :   // and we want to check if we created something valid
      41              :   BOOST_TEST( ds.get() ) ;
      42              : 
      43              : }
      44              : #endif
      45              : 
      46              : BOOST_AUTO_TEST_SUITE_END()
        

Generated by: LCOV version 2.0-1