ipc_test.h raw
1 // Copyright (c) 2023 The Limenka 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 #ifndef LIMENKA_TEST_IPC_TEST_H
6 #define LIMENKA_TEST_IPC_TEST_H
7
8 #include <primitives/transaction.h>
9 #include <script/script.h>
10 #include <univalue.h>
11 #include <util/fs.h>
12 #include <validation.h>
13
14 class FooImplementation
15 {
16 public:
17 int add(int a, int b) { return a + b; }
18 COutPoint passOutPoint(COutPoint o) { return o; }
19 UniValue passUniValue(UniValue v) { return v; }
20 CTransactionRef passTransaction(CTransactionRef t) { return t; }
21 std::vector<char> passVectorChar(std::vector<char> v) { return v; }
22 BlockValidationState passBlockState(BlockValidationState s) { return s; }
23 CScript passScript(CScript s) { return s; }
24 };
25
26 void IpcPipeTest();
27 void IpcSocketPairTest();
28 void IpcSocketTest(const fs::path& datadir);
29
30 #endif // LIMENKA_TEST_IPC_TEST_H
31