Documentation
¶
Index ¶
- type Render
- func (r *Render) Header(w io.Writer, h *models.Header) error
- func (r *Render) LoadCustomTemplates(dir string) error
- func (r *Render) LoadCustomTemplatesName(name string) error
- func (r *Render) LoadFromData(templateData [][]byte)
- func (r *Render) TestFunction(w io.Writer, f *models.Function, printInputs bool, subtests bool, named bool, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Render ¶ added in v1.7.0
type Render struct {
// contains filtered or unexported fields
}
Render manages template rendering for generating test code.
func New ¶ added in v1.7.0
func New() *Render
New creates a new Render instance with default templates and helper functions.
func (*Render) Header ¶ added in v1.7.0
Header renders the file header including package declaration and imports.
func (*Render) LoadCustomTemplates ¶ added in v1.7.0
LoadCustomTemplates allows to load in custom templates from a specified path.
func (*Render) LoadCustomTemplatesName ¶ added in v1.7.0
LoadCustomTemplatesName allows to load in custom templates of a specified name from the templates directory.
func (*Render) LoadFromData ¶ added in v1.7.0
LoadFromData allows to load from a data slice
func (*Render) TestFunction ¶ added in v1.7.0
func (r *Render) TestFunction( w io.Writer, f *models.Function, printInputs bool, subtests bool, named bool, parallel bool, useGoCmp bool, params map[string]interface{}, aiCases []interface{}) error
TestFunction renders a test function for the given function signature with the specified options.
Click to show internal directories.
Click to hide internal directories.