LCOV - code coverage report
Current view: top level - src/test/fuzz - tx_out.cpp (source / functions) Hit Total Coverage
Test: fuzz_coverage.info Lines: 2 16 12.5 %
Date: 2024-01-03 14:57:27 Functions: 1 3 33.3 %
Branches: 2 32 6.2 %

           Branch data     Line data    Source code
       1                 :            : // Copyright (c) 2019-2022 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 <consensus/validation.h>
       6                 :            : #include <core_memusage.h>
       7                 :            : #include <policy/feerate.h>
       8                 :            : #include <policy/policy.h>
       9                 :            : #include <primitives/transaction.h>
      10                 :            : #include <streams.h>
      11                 :            : #include <test/fuzz/fuzz.h>
      12                 :            : 
      13 [ +  - ][ +  - ]:          6 : FUZZ_TARGET(tx_out)
      14                 :            : {
      15                 :          0 :     DataStream ds{buffer};
      16         [ #  # ]:          0 :     CTxOut tx_out;
      17                 :            :     try {
      18         [ #  # ]:          0 :         ds >> tx_out;
      19         [ #  # ]:          0 :     } catch (const std::ios_base::failure&) {
      20                 :            :         return;
      21         [ #  # ]:          0 :     }
      22                 :            : 
      23         [ #  # ]:          0 :     const CFeeRate dust_relay_fee{DUST_RELAY_TX_FEE};
      24         [ #  # ]:          0 :     (void)GetDustThreshold(tx_out, dust_relay_fee);
      25         [ #  # ]:          0 :     (void)IsDust(tx_out, dust_relay_fee);
      26         [ #  # ]:          0 :     (void)RecursiveDynamicUsage(tx_out);
      27                 :            : 
      28         [ #  # ]:          0 :     (void)tx_out.ToString();
      29         [ #  # ]:          0 :     (void)tx_out.IsNull();
      30         [ #  # ]:          2 :     tx_out.SetNull();
      31 [ #  # ][ #  # ]:          0 :     assert(tx_out.IsNull());
      32         [ #  # ]:          0 : }

Generated by: LCOV version 1.14