LCOV - code coverage report
Current view: top level - src/wallet/test - wallet_transaction_tests.cpp (source / functions) Coverage Total Hit
Test: total_coverage.info Lines: 100.0 % 7 7
Test Date: 2024-11-04 05:10:19 Functions: 100.0 % 2 2
Branches: 52.9 % 68 36

             Branch data     Line data    Source code
       1                 :             : // Copyright (c) 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 <wallet/transaction.h>
       6                 :             : 
       7                 :             : #include <wallet/test/wallet_test_fixture.h>
       8                 :             : 
       9                 :             : #include <boost/test/unit_test.hpp>
      10                 :             : 
      11                 :             : namespace wallet {
      12                 :             : BOOST_FIXTURE_TEST_SUITE(wallet_transaction_tests, WalletTestingSetup)
      13                 :             : 
      14   [ +  -  +  -  :           7 : BOOST_AUTO_TEST_CASE(roundtrip)
          +  -  +  -  +  
          -  +  -  +  -  
          +  -  +  -  +  
          -  +  -  +  -  
          +  -  +  -  +  
          -  +  -  +  -  
          +  -  +  -  +  
          -  +  -  +  -  
          +  -  +  -  +  
          -  +  -  +  -  
          +  -  +  -  +  
                      - ]
      15                 :             : {
      16         [ +  + ]:           6 :     for (uint8_t hash = 0; hash < 5; ++hash) {
      17         [ +  + ]:          30 :         for (int index = -2; index < 3; ++index) {
      18                 :          25 :             TxState state = TxStateInterpretSerialized(TxStateUnrecognized{uint256{hash}, index});
      19         [ +  - ]:          25 :             BOOST_CHECK_EQUAL(TxStateSerializedBlockHash(state), uint256{hash});
      20         [ +  - ]:          25 :             BOOST_CHECK_EQUAL(TxStateSerializedIndex(state), index);
      21                 :             :         }
      22                 :             :     }
      23                 :           1 : }
      24                 :             : 
      25                 :             : BOOST_AUTO_TEST_SUITE_END()
      26                 :             : } // namespace wallet
        

Generated by: LCOV version 2.0-1