summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tpl/internal/templatefuncRegistry_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/tpl/internal/templatefuncRegistry_test.go b/tpl/internal/templatefuncRegistry_test.go
index dfc4ba09b..c21948077 100644
--- a/tpl/internal/templatefuncRegistry_test.go
+++ b/tpl/internal/templatefuncRegistry_test.go
@@ -14,6 +14,7 @@
package internal
import (
+ "runtime"
"testing"
"github.com/stretchr/testify/require"
@@ -29,5 +30,9 @@ func (t *Test) MyTestMethod() string {
func TestMethodToName(t *testing.T) {
test := &Test{}
- require.Equal(t, "MyTestMethod", methodToName(test.MyTestMethod))
+ if runtime.Compiler == "gccgo" {
+ require.Equal(t, "$thunk0", methodToName(test.MyTestMethod))
+ } else {
+ require.Equal(t, "MyTestMethod", methodToName(test.MyTestMethod))
+ }
}