LCOV - code coverage report
Current view: top level - dbe/unittest - confaccessor_test.cxx (source / functions) Coverage Total Hit
Test: code.result Lines: 100.0 % 10 10
Test Date: 2026-07-12 15:23:06 Functions: 100.0 % 3 3

            Line data    Source code
       1              : // DUNE DAQ modification notice:
       2              : // This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
       3              : // Fork baseline commit: dbe-02-12-17 (2022-05-12).
       4              : // Renamed since fork: yes (from test/confaccessor_test.cpp to unittest/confaccessor_test.cxx).
       5              : 
       6              : /*
       7              :  * confaccessor_test.cpp
       8              :  *
       9              :  *  Created on: 24 May 2016
      10              :  *      Author: Leonidas Georgopoulos
      11              :  */
      12              : 
      13              : #define BOOST_TEST_MAIN
      14              : 
      15              : #include "dbe_test_defs.hpp"
      16              : #include "dbe/confaccessor.hpp"
      17              : 
      18              : #include <boost/test/unit_test.hpp>
      19              : 
      20              : namespace dbe
      21              : {
      22              : namespace config
      23              : {
      24              : 
      25              : namespace test
      26              : {
      27              : struct okstestfix:
      28              :                                                                                 dbe::test::oksfix
      29              : {
      30            1 :                 okstestfix()
      31            1 :                 {
      32            1 :                         ::dbe::confaccessor::setdbinfo(QString::fromStdString(cdbpath + fn), dbtype);
      33            1 :                 }
      34              : };
      35              : 
      36              : /*
      37              :  * Check that the database can be loaded and unloaded
      38              :  */
      39            2 : BOOST_FIXTURE_TEST_CASE(load_test,okstestfix)
      40              : {
      41            1 :   BOOST_TEST_MESSAGE(std::string("Database location:")+cdbpath+fn);
      42              : 
      43            1 :         BOOST_CHECK(confaccessor::is_database_loaded()==false);
      44            1 :         BOOST_CHECK(confaccessor::load());
      45            1 :         BOOST_CHECK(confaccessor::is_database_loaded());
      46            1 : }
      47              : 
      48              : } /* namespace test */
      49              : 
      50              : } /* namespace config */
      51              : } /* namespace dbe */
      52              : 
        

Generated by: LCOV version 2.0-1