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

Function TEST_F

test/api/udf_test.cpp:22–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20};
21
22TEST_F(ApiTest, UnaryUDFInt64) {
23 conn->createScalarFunction("add5", &add5);
24 // Dummy query to ensure the add5 function is persistent after a write transaction.
25 conn->query("CREATE NODE TABLE PERSON1(ID INT64, PRIMARY KEY(ID))");
26 auto actualResult = TestHelper::convertResultToString(
27 *conn->query("MATCH (p:person) return add5(to_int32(p.age))"));
28 auto expectedResult = std::vector<std::string>{"40", "35", "50", "25", "25", "30", "45", "88"};
29 sortAndCheckTestResults(actualResult, expectedResult);
30}
31
32static int128_t int128Func(int128_t x) {
33 return x;

Callers

nothing calls this directly

Calls 9

validateUDFErrorFunction · 0.85
createScalarFunctionMethod · 0.80
removeUDFFunctionMethod · 0.80
whatMethod · 0.80
queryMethod · 0.45
toStringMethod · 0.45
getErrorMessageMethod · 0.45
isSuccessMethod · 0.45

Tested by

no test coverage detected