forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmock_process.cpp
More file actions
40 lines (31 loc) · 1017 Bytes
/
mock_process.cpp
File metadata and controls
40 lines (31 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2025-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://opensource.org/license/mit/.
#include <boost/test/unit_test.hpp>
#include <iostream>
#include <string>
BOOST_AUTO_TEST_SUITE(mock_process, *boost::unit_test::disabled())
BOOST_AUTO_TEST_CASE(valid_json, *boost::unit_test::disabled())
{
std::cout << R"({"success": true})" << std::endl;
}
BOOST_AUTO_TEST_CASE(nonzeroexit_nooutput, *boost::unit_test::disabled())
{
BOOST_FAIL("Test unconditionally fails.");
}
BOOST_AUTO_TEST_CASE(nonzeroexit_stderroutput, *boost::unit_test::disabled())
{
std::cerr << "err\n";
BOOST_FAIL("Test unconditionally fails.");
}
BOOST_AUTO_TEST_CASE(invalid_json, *boost::unit_test::disabled())
{
std::cout << "{\n";
}
BOOST_AUTO_TEST_CASE(pass_stdin_to_stdout, *boost::unit_test::disabled())
{
std::string s;
std::getline(std::cin, s);
std::cout << s << std::endl;
}
BOOST_AUTO_TEST_SUITE_END()