MCPcopy Create free account
hub / github.com/bytedance/bolt / TEST_F

Function TEST_F

bolt/expression/tests/SimpleFunctionTest.cpp:134–151  ·  view source on GitHub ↗

Functions that provide a "name" member don't need aliases; functions that do not have a "name" member do.

Source from the content-addressed store, hash-verified

132// Functions that provide a "name" member don't need aliases; functions that do
133// not have a "name" member do.
134TEST_F(SimpleFunctionTest, nameOrAliasRegistration) {
135 // This one needs alias; will throw.
136 auto registerThrow = [&]() {
137 registerFunction<UnnamedFunction, bool, int64_t>();
138 };
139 EXPECT_THROW(registerThrow(), std::runtime_error);
140
141 // These are good.
142 auto registerNoThrow = [&]() {
143 registerFunction<UnnamedFunction, bool, int64_t>({"my_alias"});
144 };
145 EXPECT_NO_THROW(registerNoThrow());
146
147 auto registerNoThrow2 = [&]() {
148 registerFunction<NamedFunction, bool, int64_t>();
149 };
150 EXPECT_NO_THROW(registerNoThrow2());
151}
152
153// Some input data.
154static std::vector<std::vector<int64_t>> arrayData = {

Callers

nothing calls this directly

Calls 15

makeArrayVectorFunction · 0.85
accumulateFunction · 0.85
ROWFunction · 0.85
evaluateFunction · 0.85
asRowTypeFunction · 0.85
compileExpressionsFunction · 0.85
testVariadicArgReuseFunction · 0.85
SelectivityVectorClass · 0.85
childAtMethod · 0.80
computeAndSetIsAsciiMethod · 0.80
getFunctionSignaturesMethod · 0.80
resolveFunctionMethod · 0.80

Tested by

no test coverage detected