mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
Add assertion to process method (#1453)
Also adjust clangd so it doesn't bother us with header files about `expected`.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "rpc/handlers/Feature.hpp"
|
||||
#include "util/Fixtures.hpp"
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/json/parse.hpp>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
@@ -46,3 +47,13 @@ TEST_F(RPCFeatureHandlerTest, AlwaysNoPermissionForVetoed)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
TEST(RPCFeatureHandlerDeathTest, ProcessCausesDeath)
|
||||
{
|
||||
FeatureHandler handler{};
|
||||
boost::asio::io_context ioContext;
|
||||
boost::asio::spawn(ioContext, [&](auto yield) {
|
||||
EXPECT_DEATH(handler.process(FeatureHandler::Input{"foo"}, Context{yield}), "");
|
||||
});
|
||||
ioContext.run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user