mock_process.cpp
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 BOOST_AUTO_TEST_CASE(valid_json, *boost::unit_test::disabled()) 13 { 14 std::cout << R"({"success": true})" << std::endl; 15 } 16 17 BOOST_AUTO_TEST_CASE(nonzeroexit_nooutput, *boost::unit_test::disabled()) 18 { 19 BOOST_FAIL("Test unconditionally fails."); 20 } 21 22 BOOST_AUTO_TEST_CASE(nonzeroexit_stderroutput, *boost::unit_test::disabled()) 23 { 24 std::cerr << "err\n"; 25 BOOST_FAIL("Test unconditionally fails."); 26 } 27 28 BOOST_AUTO_TEST_CASE(invalid_json, *boost::unit_test::disabled()) 29 { 30 std::cout << "{\n"; 31 } 32 33 BOOST_AUTO_TEST_CASE(pass_stdin_to_stdout, *boost::unit_test::disabled()) 34 { 35 std::string s; 36 std::getline(std::cin, s); 37 std::cout << s << std::endl; 38 } 39 40 BOOST_AUTO_TEST_SUITE_END()