Documentation ¶
Overview ¶
* Copyright 2022 ByteDance Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright 2022 ByteDance Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- func BasicPtrReNameToString(ctx context.Context, t reflect.Type, v reflect.Value, typeName string) string
- func BasicPtrToString(ctx context.Context, t reflect.Type, v reflect.Value) string
- func MapElementToString(ctx context.Context, v reflect.Value) string
- func NewFunctionParam(t reflect.Type) reflect.Value
- func ParameterToString(ctx context.Context, t reflect.Type, v reflect.Value) string
- func SafeSet(f reflect.Value, ctx context.Context, found bool, fake interface{})
- func SliceElementToString(ctx context.Context, v reflect.Value) string
- func StructFieldToString(ctx context.Context, v reflect.Value) string
- func ValueToString(ctx context.Context, v reflect.Value) (code string)
- func VariableMutate(ctx context.Context, t reflect.Type, v reflect.Value) (mutate reflect.Value)
- type InputVariadic
- type MocksRecord
- type MonkeyOutputMap
- type SpecialValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicPtrReNameToString ¶
func BasicPtrToString ¶
func ParameterToString ¶
ParameterToString we need record basic value Corpus
func StructFieldToString ¶
TODO: use the json to do the transform
func ValueToString ¶
value refers to the reflect value But some times it might refers to the mocksRecord.
func VariableMutate ¶
the context contains the follow information: canBeNil: Bool. If the variable is used for the mocked statement input, it could be nil. ID: ID tell us the relationship between the variable and statement. Level: determine how deeply that we do the recursion.
Types ¶
type InputVariadic ¶
type MocksRecord ¶
type MocksRecord []string
type MonkeyOutputMap ¶
type SpecialValue ¶
type SpecialValue interface {
ValueToCode() string
}