LCOV - code coverage report
Current view: top level - src/test/fuzz - script_parsing.cpp (source / functions) Coverage Total Hit
Test: test_bitcoin_coverage.info Lines: 0.0 % 16 0
Test Date: 2024-08-28 04:44:32 Functions: 0.0 % 2 0
Branches: 0.0 % 18 0

             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 <script/parsing.h>
       6                 :             : #include <test/fuzz/FuzzedDataProvider.h>
       7                 :             : #include <test/fuzz/fuzz.h>
       8                 :             : #include <util/string.h>
       9                 :             : 
      10                 :             : using util::Split;
      11                 :             : 
      12         [ #  # ]:           0 : FUZZ_TARGET(script_parsing)
      13                 :             : {
      14                 :           0 :     FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
      15                 :           0 :     const size_t query_size = fuzzed_data_provider.ConsumeIntegral<size_t>();
      16         [ #  # ]:           0 :     const std::string query = fuzzed_data_provider.ConsumeBytesAsString(std::min<size_t>(query_size, 1024 * 1024));
      17         [ #  # ]:           0 :     const std::string span_str = fuzzed_data_provider.ConsumeRemainingBytesAsString();
      18         [ #  # ]:           0 :     const Span<const char> const_span{span_str};
      19                 :             : 
      20                 :           0 :     Span<const char> mut_span = const_span;
      21         [ #  # ]:           0 :     (void)script::Const(query, mut_span);
      22                 :             : 
      23                 :           0 :     mut_span = const_span;
      24         [ #  # ]:           0 :     (void)script::Func(query, mut_span);
      25                 :             : 
      26                 :           0 :     mut_span = const_span;
      27         [ #  # ]:           0 :     (void)script::Expr(mut_span);
      28                 :             : 
      29         [ #  # ]:           0 :     if (!query.empty()) {
      30                 :           0 :         mut_span = const_span;
      31         [ #  # ]:           0 :         (void)Split(mut_span, query.front());
      32                 :             :     }
      33                 :           0 : }
        

Generated by: LCOV version 2.0-1