Documentation ¶
Overview ¶
Package srctesting contains common helpers for unit testing source code analysis and transformation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
Check type correctness of the provided AST.
Assumes "test" package import path. Fails the test if type checking fails. Provided AST is expected not to have any imports.
func Format ¶
Format AST node into a string.
The node type must be *ast.File, *printer.CommentedNode, []ast.Decl, []ast.Stmt, or assignment-compatible to ast.Expr, ast.Decl, ast.Spec, or ast.Stmt.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.