Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Fok <foka@debian.org>2017-07-28 08:28:43 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-07-28 09:03:15 +0300
commit555a9bc80653597a5c5c82fe84222813dfe5aff8 (patch)
tree55eb06e719d7657dd773b0b730a316842480c988 /tpl/internal/templatefuncRegistry_test.go
parent55d0b89417651eba3ae51c96bd9de9e0daa0399e (diff)
tpl: Accommodate gccgo in TestMethodToName
Fixes #3744
Diffstat (limited to 'tpl/internal/templatefuncRegistry_test.go')
-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))
+ }
}