| 38 | }; |
| 39 | |
| 40 | DecimalVal TestGetFnAttrs( |
| 41 | FunctionContext* ctx, const DecimalVal& arg0, BooleanVal& arg1, StringVal& arg2) { |
| 42 | FnAttr* state = reinterpret_cast<FnAttr*>( |
| 43 | ctx->GetFunctionState(FunctionContext::THREAD_LOCAL)); |
| 44 | state->return_type_size = |
| 45 | ctx->impl()->GetConstFnAttr(FunctionContextImpl::RETURN_TYPE_SIZE); |
| 46 | state->arg0_type_size = |
| 47 | ctx->impl()->GetConstFnAttr(FunctionContextImpl::ARG_TYPE_SIZE, 0); |
| 48 | state->arg1_type_size = |
| 49 | ctx->impl()->GetConstFnAttr(FunctionContextImpl::ARG_TYPE_SIZE, 1); |
| 50 | state->arg2_type_size = |
| 51 | ctx->impl()->GetConstFnAttr(FunctionContextImpl::ARG_TYPE_SIZE, 2); |
| 52 | // This function and its callees call FunctionContextImpl::GetConstFnAttr(); |
| 53 | return DecimalOperators::CastToDecimalVal(ctx, arg0); |
| 54 | } |
| 55 | |
| 56 | // Don't compile the actual test to IR |
| 57 | #ifndef IR_COMPILE |
no test coverage detected