Changed TestIssue426 to work with go 1.8 (#627)
go1.8 changed the way anonymous struct names are generated for DWARF.
This commit is contained in:
parent
a782abee90
commit
f2c1789c64
@ -2,6 +2,7 @@ package servicetest
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"runtime"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
@ -735,6 +736,14 @@ func TestIssue426(t *testing.T) {
|
|||||||
{"anoniface1", `interface { OtherFunction(int, int); SomeFunction(struct { val go/constant.Value }) }`},
|
{"anoniface1", `interface { OtherFunction(int, int); SomeFunction(struct { val go/constant.Value }) }`},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ver, _ := proc.ParseVersionString(runtime.Version())
|
||||||
|
if ver.Major < 0 || ver.AfterOrEqual(proc.GoVersion{1, 8, -1, 0, 0}) {
|
||||||
|
testcases[2].typ = `struct { main.val go/constant.Value }`
|
||||||
|
testcases[3].typ = `func(struct { main.i int }, interface {}, struct { main.val go/constant.Value })`
|
||||||
|
testcases[4].typ = `struct { main.i int; main.j int }`
|
||||||
|
testcases[5].typ = `interface { OtherFunction(int, int); SomeFunction(struct { main.val go/constant.Value }) }`
|
||||||
|
}
|
||||||
|
|
||||||
// Serialization of type expressions (go/ast.Expr) containing anonymous structs or interfaces
|
// Serialization of type expressions (go/ast.Expr) containing anonymous structs or interfaces
|
||||||
// differs from the serialization used by the linker to produce DWARF type information
|
// differs from the serialization used by the linker to produce DWARF type information
|
||||||
withTestProcess("testvariables2", t, func(p *proc.Process, fixture protest.Fixture) {
|
withTestProcess("testvariables2", t, func(p *proc.Process, fixture protest.Fixture) {
|
||||||
|
Loading…
Reference in New Issue
Block a user