MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / TEST_F

Function TEST_F

test/c_api/prepared_statement_test.cpp:13–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11};
12
13TEST_F(CApiPreparedStatementTest, IsSuccess) {
14 lbug_prepared_statement preparedStatement;
15 lbug_state state;
16 auto connection = getConnection();
17 auto query = "MATCH (a:person) WHERE a.isStudent = $1 RETURN COUNT(*)";
18 state = lbug_connection_prepare(connection, query, &preparedStatement);
19 ASSERT_EQ(state, LbugSuccess);
20 ASSERT_NE(preparedStatement._prepared_statement, nullptr);
21 ASSERT_TRUE(lbug_prepared_statement_is_success(&preparedStatement));
22 lbug_prepared_statement_destroy(&preparedStatement);
23
24 query = "MATCH (a:personnnn) WHERE a.isStudent = $1 RETURN COUNT(*)";
25 state = lbug_connection_prepare(connection, query, &preparedStatement);
26 ASSERT_EQ(state, LbugSuccess);
27 ASSERT_NE(preparedStatement._prepared_statement, nullptr);
28 ASSERT_FALSE(lbug_prepared_statement_is_success(&preparedStatement));
29 lbug_prepared_statement_destroy(&preparedStatement);
30}
31
32TEST_F(CApiPreparedStatementTest, IsReadOnly) {
33 lbug_prepared_statement preparedStatement;

Callers

nothing calls this directly

Tested by

no test coverage detected