mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 20:17:17 +00:00
1 parent
55d0b89417
commit
555a9bc806
1 file changed
+6
-1
@@ -14,6 +14,7 @@
|
|||||||
package internal
|
package internal
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
@@ -29,5 +30,9 @@ func (t *Test) MyTestMethod() string {
|
|||||||
func TestMethodToName(t *testing.T) {
|
func TestMethodToName(t *testing.T) {
|
||||||
test := &Test{}
|
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))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user