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: 2026-10-11 15:05:20 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            5 :   BOOST_CHECK_THROW(make_data_store("dummy", "dummy", nullptr, "dummy_writer"), DataStoreCreationFailed);
      27            1 : }
      28              : 
      29              : #if 0
      30              : BOOST_AUTO_TEST_CASE(valid_request)
      31              : {
      32              : 
      33              :   nlohmann::json conf ;
      34              :   conf["name"] = "test" ;
      35              : 
      36              :   // we want to ask for a valid Data Store type
      37              :   auto ds = make_data_store( "TrashCanDataStore", conf, "test" ) ;
      38              : 
      39              :   // and we want to check if we created something valid
      40              :   BOOST_TEST( ds.get() ) ;
      41              : 
      42              : }
      43              : #endif
      44              : 
      45              : BOOST_AUTO_TEST_SUITE_END()
        

Generated by: LCOV version 2.0-1