4#include <gtest/gtest.h>
10#ifndef BB_NO_EXCEPTIONS
13TEST(CBind, CatchesExceptionAndReturnsErrorResponse)
20 cmd.
g2_point = std::vector<uint8_t>(10, 0);
29 EXPECT_EQ(type_name,
"ErrorResponse") <<
"Expected ErrorResponse but got: " << type_name;
33 EXPECT_TRUE(is_error) <<
"Expected ErrorResponse variant";
37 EXPECT_FALSE(error.message.empty()) <<
"Error message should not be empty";
38 std::cout <<
"Successfully caught exception with message: " << error.message <<
'\n';
43TEST(CBind, ValidOperationReturnsSuccess)
54 EXPECT_NE(type_name,
"ErrorResponse") <<
"Valid command should not return ErrorResponse";
55 EXPECT_EQ(type_name,
"ShutdownResponse") <<
"Expected ShutdownResponse";
59 EXPECT_TRUE(is_shutdown) <<
"Expected Shutdown::Response variant";
63TEST(CBind, ExceptionsDisabled)
65 GTEST_SKIP() <<
"Skipping exception handling tests when BB_NO_EXCEPTIONS is defined";
SRS (Structured Reference String) initialization command definitions for the Barretenberg RPC API.
TEST(CBind, CatchesExceptionAndReturnsErrorResponse)
A wrapper around std::variant that provides msgpack serialization based on type names.
std::string_view get_type_name() const
CommandResponse bbapi(Command &&command)
Main API function that processes commands and returns responses.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Initialize BN254 SRS with G1 and G2 points.
std::vector< uint8_t > points_buf
std::vector< uint8_t > g2_point