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

           Branch data     Line data    Source code
       1                 :            : // Copyright (c) 2009-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 <test/fuzz/FuzzedDataProvider.h>
       6                 :            : #include <test/fuzz/fuzz.h>
       7                 :            : #include <test/fuzz/util.h>
       8                 :            : #include <util/bip32.h>
       9                 :            : 
      10                 :            : #include <cstdint>
      11                 :            : #include <vector>
      12                 :            : 
      13 [ +  - ][ +  - ]:          6 : FUZZ_TARGET(parse_hd_keypath)
      14                 :            : {
      15         [ #  # ]:          0 :     const std::string keypath_str(buffer.begin(), buffer.end());
      16                 :          0 :     std::vector<uint32_t> keypath;
      17         [ #  # ]:          0 :     (void)ParseHDKeypath(keypath_str, keypath);
      18                 :            : 
      19         [ #  # ]:          0 :     FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
      20                 :          0 :     const std::vector<uint32_t> random_keypath = ConsumeRandomLengthIntegralVector<uint32_t>(fuzzed_data_provider);
      21         [ #  # ]:          0 :     (void)FormatHDKeypath(random_keypath, /*apostrophe=*/true); // WriteHDKeypath calls this with false
      22         [ #  # ]:          0 :     (void)WriteHDKeypath(random_keypath);
      23                 :          0 : }

Generated by: LCOV version 1.14