LCOV - code coverage report
Current view: top level - src/test - mock_process.cpp (source / functions) Coverage Total Hit
Test: total_coverage.info Lines: 88.9 % 18 16
Test Date: 2026-03-16 05:20:51 Functions: 100.0 % 10 10
Branches: 42.3 % 312 132

             Branch data     Line data    Source code
       1                 :             : // Copyright (c) 2025-present The Bitcoin Core developers
       2                 :             : // Distributed under the MIT software license, see the accompanying
       3                 :             : // file COPYING or https://opensource.org/license/mit/.
       4                 :             : 
       5                 :             : #include <boost/test/unit_test.hpp>
       6                 :             : 
       7                 :             : #include <iostream>
       8                 :             : #include <string>
       9                 :             : 
      10                 :             : BOOST_AUTO_TEST_SUITE(mock_process, *boost::unit_test::disabled())
      11                 :             : 
      12   [ +  -  +  -  :           7 : BOOST_AUTO_TEST_CASE(valid_json, *boost::unit_test::disabled())
          +  -  +  -  -  
          +  +  -  +  -  
          +  -  +  -  +  
          -  -  +  +  -  
          +  -  +  -  +  
          -  +  -  -  +  
          +  -  +  -  +  
          -  +  -  +  -  
          -  +  +  -  +  
          -  +  -  +  -  
          +  -  -  +  +  
                      - ]
      13                 :             : {
      14                 :           1 :     std::cout << R"({"success": true})" << std::endl;
      15                 :           1 : }
      16                 :             : 
      17   [ +  -  +  -  :           5 : BOOST_AUTO_TEST_CASE(nonzeroexit_nooutput, *boost::unit_test::disabled())
          +  -  +  -  -  
          +  +  -  +  -  
          +  -  +  -  +  
          -  -  +  +  -  
          +  -  +  -  +  
          -  +  -  -  +  
          +  -  -  -  -  
          -  -  -  -  -  
          -  -  -  -  -  
          -  -  -  -  -  
          -  -  -  -  -  
                      - ]
      18                 :             : {
      19         [ -  + ]:           2 :     BOOST_FAIL("Test unconditionally fails.");
      20                 :           0 : }
      21                 :             : 
      22   [ +  -  +  -  :           5 : BOOST_AUTO_TEST_CASE(nonzeroexit_stderroutput, *boost::unit_test::disabled())
          +  -  +  -  -  
          +  +  -  +  -  
          +  -  +  -  +  
          -  -  +  +  -  
          +  -  +  -  +  
          -  +  -  -  +  
          +  -  -  -  -  
          -  -  -  -  -  
          -  -  -  -  -  
          -  -  -  -  -  
          -  -  -  -  -  
                      - ]
      23                 :             : {
      24                 :           1 :     std::cerr << "err\n";
      25         [ -  + ]:           2 :     BOOST_FAIL("Test unconditionally fails.");
      26                 :           0 : }
      27                 :             : 
      28   [ +  -  +  -  :           7 : BOOST_AUTO_TEST_CASE(invalid_json, *boost::unit_test::disabled())
          +  -  +  -  -  
          +  +  -  +  -  
          +  -  +  -  +  
          -  -  +  +  -  
          +  -  +  -  +  
          -  +  -  -  +  
          +  -  +  -  +  
          -  +  -  +  -  
          -  +  +  -  +  
          -  +  -  +  -  
          +  -  -  +  +  
                      - ]
      29                 :             : {
      30                 :           1 :     std::cout << "{\n";
      31                 :           1 : }
      32                 :             : 
      33   [ +  -  +  -  :           7 : BOOST_AUTO_TEST_CASE(pass_stdin_to_stdout, *boost::unit_test::disabled())
          +  -  +  -  -  
          +  +  -  +  -  
          +  -  +  -  +  
          -  -  +  +  -  
          +  -  +  -  +  
          -  +  -  -  +  
          +  -  +  -  +  
          -  +  -  +  -  
          -  +  +  -  +  
          -  +  -  +  -  
          +  -  -  +  +  
                      - ]
      34                 :             : {
      35         [ +  - ]:           1 :     std::string s;
      36         [ +  - ]:           1 :     std::getline(std::cin, s);
      37   [ -  +  +  - ]:           2 :     std::cout << s << std::endl;
      38                 :           1 : }
      39                 :             : 
      40                 :             : BOOST_AUTO_TEST_SUITE_END()
        

Generated by: LCOV version 2.0-1