Bitcoin Core 31.99.0
P2P Digital Currency
Classes | Namespaces | Macros | Functions | Variables
test.cpp File Reference
#include <mp/test/foo.capnp.h>
#include <mp/test/foo.capnp.proxy.h>
#include <atomic>
#include <capnp/capability.h>
#include <capnp/rpc.h>
#include <cassert>
#include <chrono>
#include <condition_variable>
#include <cstdint>
#include <cstring>
#include <functional>
#include <future>
#include <kj/async.h>
#include <kj/async-io.h>
#include <kj/common.h>
#include <kj/exception.h>
#include <kj/debug.h>
#include <kj/memory.h>
#include <kj/string.h>
#include <kj/test.h>
#include <memory>
#include <mp/proxy.h>
#include <mp/proxy.capnp.h>
#include <mp/proxy-io.h>
#include <mp/util.h>
#include <mp/version.h>
#include <optional>
#include <set>
#include <stdexcept>
#include <string>
#include <string_view>
#include <thread>
#include <type_traits>
#include <unordered_set>
#include <utility>
#include <vector>
Include dependency graph for test.cpp:

Go to the source code of this file.

Classes

class  mp::test::TestSetup
 Test setup class creating a two way connection between a ProxyServer<FooInterface> object and a ProxyClient<FooInterface>. More...
 

Namespaces

namespace  mp
 Functions to serialize / deserialize common bitcoin types.
 
namespace  mp::test
 

Macros

#define EXPECT_EXCEPTION(call, message)
 Assert that a call throws std::runtime_error with the given message. More...
 

Functions

 mp::test::KJ_TEST ("Call FooInterface methods")
 
 mp::test::KJ_TEST ("Call IPC method after client connection is closed")
 
 mp::test::KJ_TEST ("Calling IPC method after server connection is closed")
 
 mp::test::KJ_TEST ("Calling IPC method and disconnecting during the call")
 
 mp::test::KJ_TEST ("Calling IPC method, disconnecting and blocking during the call")
 
 mp::test::KJ_TEST ("Worker thread destroyed before it is initialized")
 
 mp::test::KJ_TEST ("Calling async IPC method, with server disconnect racing the call")
 
 mp::test::KJ_TEST ("Calling async IPC method, with server disconnect after cleanup")
 
 mp::test::KJ_TEST ("Destroying ProxyClient<> with destroy method after peer disconnect")
 
 mp::test::KJ_TEST ("Make simultaneous IPC calls on single remote thread")
 
 mp::test::KJ_TEST ("Call async IPC method dispatched to pool thread")
 
 mp::test::KJ_TEST ("Call async IPC method without thread or pool errors correctly")
 

Variables

constexpr auto mp::test::kMP_MAJOR_VERSION {MP_MAJOR_VERSION}
 Check version.h header values. More...
 
constexpr auto mp::test::kMP_MINOR_VERSION {MP_MINOR_VERSION}
 

Macro Definition Documentation

◆ EXPECT_EXCEPTION

#define EXPECT_EXCEPTION (   call,
  message 
)
Value:
try { \
call; \
KJ_EXPECT(false); \
} catch (const std::runtime_error& e) { \
KJ_EXPECT(std::string_view{e.what()} == message); \
}

Assert that a call throws std::runtime_error with the given message.

Definition at line 44 of file test.cpp.