LCOV - code coverage report
Current view: top level - src/test - fees_util_tests.cpp (source / functions) Coverage Total Hit
Test: test_bitcoin_coverage.info Lines: 100.0 % 11 11
Test Date: 2026-08-25 06:16:57 Functions: 100.0 % 4 4
Branches: 50.0 % 142 71

             Branch data     Line data    Source code
       1                 :             : // Copyright (c) The Bitcoin Core developers
       2                 :             : // Distributed under the MIT software license, see the accompanying
       3                 :             : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4                 :             : 
       5                 :             : #include <util/fees.h>
       6                 :             : 
       7                 :             : #include <boost/test/unit_test.hpp>
       8                 :             : 
       9                 :             : BOOST_AUTO_TEST_SUITE(fees_util_tests)
      10                 :             : 
      11   [ +  -  +  -  :           7 : BOOST_AUTO_TEST_CASE(fee_rate_estimator_type_to_string)
          +  -  +  -  -  
          +  +  -  +  -  
          +  -  +  -  +  
          -  -  +  +  -  
          +  -  +  -  +  
          -  +  -  -  +  
          +  -  +  -  +  
          -  +  -  +  -  
          -  +  +  -  +  
          -  +  -  +  -  
          +  -  -  +  +  
                      - ]
      12                 :             : {
      13         [ +  - ]:           1 :     BOOST_CHECK_EQUAL(FeeRateEstimatorTypeToString(FeeRateEstimatorType::NONE), "none");
      14         [ +  - ]:           1 :     BOOST_CHECK_EQUAL(FeeRateEstimatorTypeToString(FeeRateEstimatorType::BLOCK_POLICY), "block_policy");
      15         [ +  - ]:           1 :     BOOST_CHECK_EQUAL(FeeRateEstimatorTypeToString(FeeRateEstimatorType::MEMPOOL_POLICY), "mempool_policy");
      16                 :           1 : }
      17                 :             : 
      18   [ +  -  +  -  :           7 : BOOST_AUTO_TEST_CASE(fee_rate_estimator_type_from_string)
          +  -  +  -  -  
          +  +  -  +  -  
          +  -  +  -  +  
          -  -  +  +  -  
          +  -  +  -  +  
          -  +  -  -  +  
          +  -  +  -  +  
          -  +  -  +  -  
          -  +  +  -  +  
          -  +  -  +  -  
          +  -  -  +  +  
                      - ]
      19                 :             : {
      20   [ +  -  +  - ]:           2 :     BOOST_CHECK(FeeRateEstimatorTypeFromString("none") == FeeRateEstimatorType::NONE);
      21   [ +  -  +  - ]:           2 :     BOOST_CHECK(FeeRateEstimatorTypeFromString("block_policy") == FeeRateEstimatorType::BLOCK_POLICY);
      22   [ +  -  +  - ]:           2 :     BOOST_CHECK(FeeRateEstimatorTypeFromString("mempool_policy") == FeeRateEstimatorType::MEMPOOL_POLICY);
      23   [ +  -  +  - ]:           2 :     BOOST_CHECK(FeeRateEstimatorTypeFromString("unknown") == FeeRateEstimatorType::NONE);
      24                 :           1 : }
      25                 :             : 
      26                 :             : BOOST_AUTO_TEST_SUITE_END()
        

Generated by: LCOV version 2.0-1