Return error when limit<=0 (#804)

Fix #806
This commit is contained in:
cyan317
2023-08-02 15:34:42 +01:00
committed by GitHub
parent 1804e3e9c0
commit c90bc15959
45 changed files with 832 additions and 562 deletions

View File

@@ -32,7 +32,7 @@ TEST_F(RPCRandomHandlerTest, Default)
{
runSpawn([](auto yield) {
auto const handler = AnyHandler{RandomHandler{}};
auto const output = handler.process(boost::json::parse(R"({})"), Context{std::ref(yield)});
auto const output = handler.process(boost::json::parse(R"({})"), Context{yield});
ASSERT_TRUE(output);
EXPECT_TRUE(output->as_object().contains(JS(random)));
EXPECT_EQ(output->as_object().at(JS(random)).as_string().size(), 64u);