LCOV - code coverage report
Current view: top level - src/test/fuzz - parse_numbers.cpp (source / functions) Coverage Total Hit
Test: fuzz_coverage.info Lines: 100.0 % 19 19
Test Date: 2024-09-01 05:20:30 Functions: 100.0 % 2 2
Branches: 50.0 % 26 13

             Branch data     Line data    Source code
       1                 :             : // Copyright (c) 2009-2021 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/fuzz.h>
       6                 :             : #include <util/moneystr.h>
       7                 :             : #include <util/strencodings.h>
       8                 :             : 
       9                 :             : #include <string>
      10                 :             : 
      11   [ +  -  +  - ]:         237 : FUZZ_TARGET(parse_numbers)
      12                 :             : {
      13         [ +  - ]:         234 :     const std::string random_string(buffer.begin(), buffer.end());
      14                 :             : 
      15         [ +  - ]:         234 :     (void)ParseMoney(random_string);
      16                 :             : 
      17                 :         234 :     uint8_t u8;
      18         [ +  - ]:         234 :     (void)ParseUInt8(random_string, &u8);
      19                 :             : 
      20                 :         234 :     uint16_t u16;
      21         [ +  - ]:         234 :     (void)ParseUInt16(random_string, &u16);
      22                 :             : 
      23                 :         234 :     int32_t i32;
      24         [ +  - ]:         234 :     (void)ParseInt32(random_string, &i32);
      25         [ +  - ]:         234 :     (void)LocaleIndependentAtoi<int>(random_string);
      26                 :             : 
      27                 :         234 :     uint32_t u32;
      28         [ +  - ]:         234 :     (void)ParseUInt32(random_string, &u32);
      29                 :             : 
      30                 :         234 :     int64_t i64;
      31         [ +  - ]:         234 :     (void)LocaleIndependentAtoi<int64_t>(random_string);
      32         [ +  - ]:         234 :     (void)ParseFixedPoint(random_string, 3, &i64);
      33         [ +  - ]:         234 :     (void)ParseInt64(random_string, &i64);
      34                 :             : 
      35                 :         234 :     uint64_t u64;
      36         [ +  - ]:         234 :     (void)ParseUInt64(random_string, &u64);
      37                 :         234 : }
        

Generated by: LCOV version 2.0-1