LCOV - code coverage report
Current view: top level - src/test/fuzz/util - threadinterrupt.cpp (source / functions) Coverage Total Hit
Test: fuzz_coverage.info Lines: 100.0 % 8 8
Test Date: 2025-10-10 04:04:55 Functions: 100.0 % 3 3

            Line data    Source code
       1              : // Copyright (c) 2024-present 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 <test/fuzz/util.h>
       6              : #include <test/fuzz/util/threadinterrupt.h>
       7              : 
       8         1993 : FuzzedThreadInterrupt::FuzzedThreadInterrupt(FuzzedDataProvider& fuzzed_data_provider)
       9         1993 :     : m_fuzzed_data_provider{fuzzed_data_provider}
      10              : {
      11         1993 : }
      12              : 
      13         8594 : bool FuzzedThreadInterrupt::interrupted() const
      14              : {
      15         8594 :     return m_fuzzed_data_provider.ConsumeBool();
      16              : }
      17              : 
      18            2 : bool FuzzedThreadInterrupt::sleep_for(Clock::duration)
      19              : {
      20            2 :     SetMockTime(ConsumeTime(m_fuzzed_data_provider)); // Time could go backwards.
      21            2 :     return m_fuzzed_data_provider.ConsumeBool();
      22              : }
        

Generated by: LCOV version 2.0-1