// TestRTA runs RTA on each testdata/*.txtar file containing a single // go file in a single package or multiple files in different packages, // and compares the results with the expectations expressed in the WANT // comment. func TestRTA(t *testing.T) { … } // check tests the RTA analysis results against the test expectations // defined by a comment starting with a line "WANT:". // // The rest of the comment consists of lines of the following forms: // // edge <func> --kind--> <func> # call graph edge // reachable <func> # reachable function // rtype <type> # run-time type descriptor needed // // Each line asserts that an element is found in the given set, or, if // the line is preceded by "!", that it is not in the set. // // Functions are notated as if by ssa.Function.String. func check(t *testing.T, f *ast.File, pkg *ssa.Package, res *rta.Result) { … }