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

Function TEST_F

test/api/result_value_test.cpp:9–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7class ResultValueTest : public ApiTest {};
8
9TEST_F(ResultValueTest, getNextException) {
10 auto query = "MATCH (o:organisation) RETURN o.name";
11 auto result = conn->query(query);
12 try {
13 for (int i = 0; i < 4; i++) {
14 result->getNext();
15 }
16 FAIL();
17 } catch (RuntimeException& exception) {
18 ASSERT_STREQ("Runtime exception: No more tuples in QueryResult, Please check hasNext() "
19 "before calling getNext().",
20 exception.what());
21 } catch (Exception& exception) {
22 FAIL();
23 } catch (std::exception& exception) {
24 FAIL();
25 }
26}
27
28TEST_F(ResultValueTest, getResultValueException) {
29 auto query = "MATCH (a:person) RETURN a.fName";

Callers

nothing calls this directly

Calls 9

copyFlatTupleFunction · 0.85
whatMethod · 0.80
emplace_backMethod · 0.80
queryMethod · 0.45
getNextMethod · 0.45
getValueMethod · 0.45
hasNextMethod · 0.45
getMethod · 0.45
isNullMethod · 0.45

Tested by

no test coverage detected