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

           Branch data     Line data    Source code
       1                 :            : // Copyright (c) 2019-2020 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/policy.h>
       8                 :            : #include <primitives/transaction.h>
       9                 :            : #include <streams.h>
      10                 :            : #include <test/fuzz/fuzz.h>
      11                 :            : 
      12                 :            : #include <cassert>
      13                 :            : 
      14 [ +  - ][ +  - ]:          6 : FUZZ_TARGET(tx_in)
      15                 :            : {
      16                 :          0 :     DataStream ds{buffer};
      17         [ #  # ]:          0 :     CTxIn tx_in;
      18                 :            :     try {
      19         [ #  # ]:          0 :         ds >> tx_in;
      20         [ #  # ]:          0 :     } catch (const std::ios_base::failure&) {
      21                 :            :         return;
      22         [ #  # ]:          0 :     }
      23                 :            : 
      24         [ #  # ]:          0 :     (void)GetTransactionInputWeight(tx_in);
      25         [ #  # ]:          0 :     (void)GetVirtualTransactionInputSize(tx_in);
      26         [ #  # ]:          0 :     (void)RecursiveDynamicUsage(tx_in);
      27                 :            : 
      28         [ #  # ]:          0 :     (void)tx_in.ToString();
      29         [ #  # ]:          0 : }

Generated by: LCOV version 1.14