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

             Branch data     Line data    Source code
       1                 :             : // Copyright (c) 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 <protocol.h>
       6                 :             : #include <test/fuzz/FuzzedDataProvider.h>
       7                 :             : #include <test/fuzz/fuzz.h>
       8                 :             : #include <test/fuzz/util.h>
       9                 :             : 
      10                 :             : #include <cstdint>
      11                 :             : #include <optional>
      12                 :             : #include <stdexcept>
      13                 :             : #include <vector>
      14                 :             : 
      15         [ #  # ]:           0 : FUZZ_TARGET(protocol)
      16                 :             : {
      17                 :           0 :     FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
      18                 :           0 :     const std::optional<CInv> inv = ConsumeDeserializable<CInv>(fuzzed_data_provider);
      19         [ #  # ]:           0 :     if (!inv) {
      20                 :             :         return;
      21                 :             :     }
      22                 :           0 :     try {
      23         [ #  # ]:           0 :         (void)inv->GetCommand();
      24         [ -  - ]:           0 :     } catch (const std::out_of_range&) {
      25                 :           0 :     }
      26                 :           0 :     (void)inv->ToString();
      27                 :           0 :     const std::optional<CInv> another_inv = ConsumeDeserializable<CInv>(fuzzed_data_provider);
      28         [ #  # ]:           0 :     if (!another_inv) {
      29                 :             :         return;
      30                 :             :     }
      31                 :           0 :     (void)(*inv < *another_inv);
      32                 :             : }
        

Generated by: LCOV version 2.0-1