LCOV - code coverage report
Current view: top level - dbe/unittest - confaccessor_test.cxx (source / functions) Coverage Total Hit
Test: code.result Lines: 100.0 % 7 7
Test Date: 2026-10-11 15:05:20 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/confaccessor.hpp"
      16              : #include "dbe_test_defs.hpp"
      17              : 
      18              : #include <boost/test/unit_test.hpp>
      19              : 
      20              : namespace dbe {
      21              : namespace config {
      22              : 
      23              : namespace test {
      24              : struct okstestfix : dbe::test::oksfix
      25              : {
      26            1 :   okstestfix() { ::dbe::confaccessor::setdbinfo(QString::fromStdString(cdbpath + fn), dbtype); }
      27              : };
      28              : 
      29              : /*
      30              :  * Check that the database can be loaded and unloaded
      31              :  */
      32            2 : BOOST_FIXTURE_TEST_CASE(load_test, okstestfix)
      33              : {
      34            1 :   BOOST_TEST_MESSAGE(std::string("Database location:") + cdbpath + fn);
      35              : 
      36            1 :   BOOST_CHECK(confaccessor::is_database_loaded() == false);
      37            1 :   BOOST_CHECK(confaccessor::load());
      38            1 :   BOOST_CHECK(confaccessor::is_database_loaded());
      39            1 : }
      40              : 
      41              : } /* namespace test */
      42              : 
      43              : } /* namespace config */
      44              : } /* namespace dbe */
        

Generated by: LCOV version 2.0-1