tpl: Fix test to pass with gccgo
authorIan Lance Taylor <iant@golang.org>
Fri, 9 Nov 2018 07:54:08 +0000 (02:54 -0500)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 9 Nov 2018 07:54:08 +0000 (08:54 +0100)
commita8cb1b07b4cf7fcf0e949657cb03c1a4838f975e
tree785d5f4b173e717a5e6ae9b39a111b57c5c8a63a
parent2900801acfdc06ec5631fc5772d1b82d0d671915
tpl: Fix test to pass with gccgo

When run under gccgo, the test looks for the name that gccgo gives to
a thunk method.  This name is not normally visible, but can be seen
when using reflect.FuncForPC as this code does.  That name changed in
https://golang.org/cl/89555.  Change the test to work with both the
old name "$thunk0" and the new name "thunk0".

Fixes golang/go#28669
tpl/internal/templatefuncRegistry_test.go