LCOV - code coverage report
Current view: top level - src/test - system_ram_tests.cpp (source / functions) Coverage Total Hit
Test: test_bitcoin_coverage.info Lines: 100.0 % 6 6
Test Date: 2026-08-07 06:33:33 Functions: 100.0 % 2 2
Branches: 50.0 % 66 33

             Branch data     Line data    Source code
       1                 :             : // Copyright (c) 2025-present The Bitcoin Core developers
       2                 :             : // Distributed under the MIT software license, see the accompanying
       3                 :             : // file COPYING or https://opensource.org/license/mit/.
       4                 :             : 
       5                 :             : #include <common/system.h>
       6                 :             : #include <util/byte_units.h>
       7                 :             : 
       8                 :             : #include <boost/test/unit_test.hpp>
       9                 :             : 
      10                 :             : BOOST_AUTO_TEST_SUITE(system_ram_tests)
      11                 :             : 
      12   [ +  -  +  -  :           7 : BOOST_AUTO_TEST_CASE(total_ram)
          +  -  +  -  -  
          +  +  -  +  -  
          +  -  +  -  +  
          -  -  +  +  -  
          +  -  +  -  +  
          -  +  -  -  +  
          +  -  +  -  +  
          -  +  -  +  -  
          -  +  +  -  +  
          -  +  -  +  -  
          +  -  -  +  +  
                      - ]
      13                 :             : {
      14                 :           1 :     const auto total{TryGetTotalRam()};
      15         [ +  - ]:           2 :     BOOST_REQUIRE(total);
      16         [ +  - ]:           1 :     BOOST_CHECK_GE(*total, 1_GiB);
      17         [ +  - ]:           1 :     BOOST_CHECK_LT(*total, 10'000_GiB); // ~10 TiB memory is unlikely
      18                 :           1 : }
      19                 :             : 
      20                 :             : BOOST_AUTO_TEST_SUITE_END()
        

Generated by: LCOV version 2.0-1