assert: look for the right function call in the source
Fixes #195
Required moving all the tests which used internal/source to external test packages.
When scanning for an ast.CallExpr only consider those that use a ast.SelectorExpr where the name of the X is a gotest.tools package. That way if there are other function calls on the line, it will continue looking for the right call.
This makes the lookup logic more complicated, and will break if someone assigns assert.<func> to a local var. Hopefully that is not a common practice.
Fixes #195
Required moving all the tests which used
internal/sourceto external test packages.When scanning for an
ast.CallExpronly consider those that use aast.SelectorExprwhere the name of theXis a gotest.tools package. That way if there are other function calls on the line, it will continue looking for the right call.This makes the lookup logic more complicated, and will break if someone assigns
assert.<func>to a local var. Hopefully that is not a com