| 20 | }; |
| 21 | |
| 22 | TEST_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 | |
| 32 | static int128_t int128Func(int128_t x) { |
| 33 | return x; |
nothing calls this directly
no test coverage detected