2020-03-31 12:56:10 +00:00
|
|
|
package compiler
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2020-11-23 11:09:00 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/internal/testserdes"
|
compiler: add ability to generate .abi.json file
A part of integration with NEO Blockchain Toolkit (see #902). To be
able to deploy smart-contract compiled with neo-go compiler via NEO
Express, we have to generate additional .abi.json file. This file
contains the following information:
- hash of the compiled contract
- smart-contract metadata (title, description, version, author,
email, has-storage, has-dynamic-invoke, is-payable)
- smart-contract entry point
- functions
- events
However, this .abi.json file is slightly different from the one,
described in manifest.go, so we have to add auxilaury stractures for
json marshalling. The .abi.json format used by NEO-Express is described
[here](https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.Compiler.MSIL/FuncExport.cs#L66).
2020-04-28 16:39:01 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
2020-06-25 13:10:08 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest"
|
2020-06-24 04:22:33 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
2020-03-31 13:16:32 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/stretchr/testify/require"
|
2020-03-31 12:56:10 +00:00
|
|
|
)
|
|
|
|
|
2020-03-31 13:16:32 +00:00
|
|
|
func TestCodeGen_DebugInfo(t *testing.T) {
|
|
|
|
src := `package foo
|
2020-08-28 08:08:04 +00:00
|
|
|
import "github.com/nspcc-dev/neo-go/pkg/interop"
|
|
|
|
import "github.com/nspcc-dev/neo-go/pkg/interop/storage"
|
|
|
|
import "github.com/nspcc-dev/neo-go/pkg/interop/blockchain"
|
|
|
|
import "github.com/nspcc-dev/neo-go/pkg/interop/contract"
|
2020-03-31 13:16:32 +00:00
|
|
|
func Main(op string) bool {
|
2020-04-02 13:36:11 +00:00
|
|
|
var s string
|
|
|
|
_ = s
|
2020-07-03 09:58:41 +00:00
|
|
|
res := MethodInt(op)
|
|
|
|
_ = MethodString()
|
|
|
|
_ = MethodByteArray()
|
|
|
|
_ = MethodArray()
|
|
|
|
_ = MethodStruct()
|
|
|
|
_ = MethodConcat("a", "b", "c")
|
|
|
|
_ = unexportedMethod()
|
2020-03-31 13:16:32 +00:00
|
|
|
return res == 42
|
|
|
|
}
|
|
|
|
|
2020-07-03 09:58:41 +00:00
|
|
|
func MethodInt(a string) int {
|
2020-03-31 13:16:32 +00:00
|
|
|
if a == "get42" {
|
|
|
|
return 42
|
|
|
|
}
|
|
|
|
return 3
|
|
|
|
}
|
2020-07-03 09:58:41 +00:00
|
|
|
func MethodConcat(a, b string, c string) string{
|
2020-04-29 13:32:07 +00:00
|
|
|
return a + b + c
|
|
|
|
}
|
2020-07-03 09:58:41 +00:00
|
|
|
func MethodString() string { return "" }
|
|
|
|
func MethodByteArray() []byte { return nil }
|
|
|
|
func MethodArray() []bool { return nil }
|
|
|
|
func MethodStruct() struct{} { return struct{}{} }
|
|
|
|
func unexportedMethod() int { return 1 }
|
2020-08-28 08:08:04 +00:00
|
|
|
func MethodParams(addr interop.Hash160, h interop.Hash256,
|
|
|
|
sig interop.Signature, pub interop.PublicKey,
|
|
|
|
inter interop.Interface, ctr contract.Contract,
|
|
|
|
ctx storage.Context, tx blockchain.Transaction) bool {
|
|
|
|
return true
|
|
|
|
}
|
2020-09-01 16:06:32 +00:00
|
|
|
type MyStruct struct {}
|
|
|
|
func (ms MyStruct) MethodOnStruct() { }
|
|
|
|
func (ms *MyStruct) MethodOnPointerToStruct() { }
|
2020-10-02 10:16:02 +00:00
|
|
|
func _deploy(isUpdate bool) {}
|
2020-03-31 13:16:32 +00:00
|
|
|
`
|
|
|
|
|
2020-08-10 10:06:06 +00:00
|
|
|
info, err := getBuildInfo("foo.go", src)
|
2020-03-31 13:16:32 +00:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
pkg := info.program.Package(info.initialPackage)
|
|
|
|
c := newCodegen(info, pkg)
|
|
|
|
require.NoError(t, c.compile(info, pkg))
|
|
|
|
|
|
|
|
buf := c.prog.Bytes()
|
2020-06-24 04:22:33 +00:00
|
|
|
d := c.emitDebugInfo(buf)
|
2020-03-31 13:16:32 +00:00
|
|
|
require.NotNil(t, d)
|
|
|
|
|
|
|
|
t.Run("return types", func(t *testing.T) {
|
|
|
|
returnTypes := map[string]string{
|
2020-07-03 09:58:41 +00:00
|
|
|
"MethodInt": "Integer",
|
|
|
|
"MethodConcat": "String",
|
2020-07-29 09:13:07 +00:00
|
|
|
"MethodString": "String", "MethodByteArray": "ByteString",
|
2020-07-03 09:58:41 +00:00
|
|
|
"MethodArray": "Array", "MethodStruct": "Struct",
|
2020-09-01 16:06:32 +00:00
|
|
|
"Main": "Boolean",
|
|
|
|
"unexportedMethod": "Integer",
|
|
|
|
"MethodOnStruct": "Void",
|
|
|
|
"MethodOnPointerToStruct": "Void",
|
2020-08-28 08:08:04 +00:00
|
|
|
"MethodParams": "Boolean",
|
2020-10-02 10:16:02 +00:00
|
|
|
"_deploy": "Void",
|
2020-03-31 13:16:32 +00:00
|
|
|
}
|
|
|
|
for i := range d.Methods {
|
2020-08-13 07:29:08 +00:00
|
|
|
name := d.Methods[i].ID
|
2020-03-31 13:16:32 +00:00
|
|
|
assert.Equal(t, returnTypes[name], d.Methods[i].ReturnType)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2020-04-02 13:36:11 +00:00
|
|
|
t.Run("variables", func(t *testing.T) {
|
|
|
|
vars := map[string][]string{
|
|
|
|
"Main": {"s,String", "res,Integer"},
|
|
|
|
}
|
|
|
|
for i := range d.Methods {
|
2020-08-13 07:29:08 +00:00
|
|
|
v, ok := vars[d.Methods[i].ID]
|
2020-04-02 13:36:11 +00:00
|
|
|
if ok {
|
|
|
|
require.Equal(t, v, d.Methods[i].Variables)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2020-04-29 13:32:07 +00:00
|
|
|
t.Run("param types", func(t *testing.T) {
|
|
|
|
paramTypes := map[string][]DebugParam{
|
2020-10-02 10:16:02 +00:00
|
|
|
"_deploy": {{
|
|
|
|
Name: "isUpdate",
|
|
|
|
Type: "Boolean",
|
|
|
|
}},
|
2020-07-03 09:58:41 +00:00
|
|
|
"MethodInt": {{
|
2020-04-29 13:32:07 +00:00
|
|
|
Name: "a",
|
|
|
|
Type: "String",
|
|
|
|
}},
|
2020-07-03 09:58:41 +00:00
|
|
|
"MethodConcat": {
|
2020-04-29 13:32:07 +00:00
|
|
|
{
|
|
|
|
Name: "a",
|
|
|
|
Type: "String",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "b",
|
|
|
|
Type: "String",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "c",
|
|
|
|
Type: "String",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"Main": {{
|
|
|
|
Name: "op",
|
|
|
|
Type: "String",
|
|
|
|
}},
|
|
|
|
}
|
|
|
|
for i := range d.Methods {
|
2020-08-13 07:29:08 +00:00
|
|
|
v, ok := paramTypes[d.Methods[i].ID]
|
2020-04-29 13:32:07 +00:00
|
|
|
if ok {
|
|
|
|
require.Equal(t, v, d.Methods[i].Parameters)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2020-03-31 13:16:32 +00:00
|
|
|
// basic check that last instruction of every method is indeed RET
|
|
|
|
for i := range d.Methods {
|
|
|
|
index := d.Methods[i].Range.End
|
|
|
|
require.True(t, int(index) < len(buf))
|
|
|
|
require.EqualValues(t, opcode.RET, buf[index])
|
|
|
|
}
|
compiler: add ability to generate .abi.json file
A part of integration with NEO Blockchain Toolkit (see #902). To be
able to deploy smart-contract compiled with neo-go compiler via NEO
Express, we have to generate additional .abi.json file. This file
contains the following information:
- hash of the compiled contract
- smart-contract metadata (title, description, version, author,
email, has-storage, has-dynamic-invoke, is-payable)
- smart-contract entry point
- functions
- events
However, this .abi.json file is slightly different from the one,
described in manifest.go, so we have to add auxilaury stractures for
json marshalling. The .abi.json format used by NEO-Express is described
[here](https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.Compiler.MSIL/FuncExport.cs#L66).
2020-04-28 16:39:01 +00:00
|
|
|
|
2020-06-25 13:10:08 +00:00
|
|
|
t.Run("convert to Manifest", func(t *testing.T) {
|
2020-11-20 08:02:58 +00:00
|
|
|
actual, err := d.ConvertToManifest("MyCTR", nil)
|
2020-06-25 13:10:08 +00:00
|
|
|
require.NoError(t, err)
|
2020-07-23 13:12:41 +00:00
|
|
|
// note: offsets are hard to predict, so we just take them from the output
|
2020-06-25 13:10:08 +00:00
|
|
|
expected := &manifest.Manifest{
|
2020-11-20 08:02:58 +00:00
|
|
|
Name: "MyCTR",
|
2020-06-25 13:10:08 +00:00
|
|
|
ABI: manifest.ABI{
|
2020-07-23 13:03:00 +00:00
|
|
|
Methods: []manifest.Method{
|
|
|
|
{
|
2020-10-02 10:16:02 +00:00
|
|
|
Name: "_deploy",
|
2020-07-23 13:12:41 +00:00
|
|
|
Offset: 0,
|
2020-10-02 10:16:02 +00:00
|
|
|
Parameters: []manifest.Parameter{
|
|
|
|
manifest.NewParameter("isUpdate", smartcontract.BoolType),
|
|
|
|
},
|
|
|
|
ReturnType: smartcontract.VoidType,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "main",
|
|
|
|
Offset: 4,
|
2020-07-23 13:03:00 +00:00
|
|
|
Parameters: []manifest.Parameter{
|
|
|
|
manifest.NewParameter("op", smartcontract.StringType),
|
compiler: add ability to generate .abi.json file
A part of integration with NEO Blockchain Toolkit (see #902). To be
able to deploy smart-contract compiled with neo-go compiler via NEO
Express, we have to generate additional .abi.json file. This file
contains the following information:
- hash of the compiled contract
- smart-contract metadata (title, description, version, author,
email, has-storage, has-dynamic-invoke, is-payable)
- smart-contract entry point
- functions
- events
However, this .abi.json file is slightly different from the one,
described in manifest.go, so we have to add auxilaury stractures for
json marshalling. The .abi.json format used by NEO-Express is described
[here](https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.Compiler.MSIL/FuncExport.cs#L66).
2020-04-28 16:39:01 +00:00
|
|
|
},
|
2020-07-23 13:03:00 +00:00
|
|
|
ReturnType: smartcontract.BoolType,
|
compiler: add ability to generate .abi.json file
A part of integration with NEO Blockchain Toolkit (see #902). To be
able to deploy smart-contract compiled with neo-go compiler via NEO
Express, we have to generate additional .abi.json file. This file
contains the following information:
- hash of the compiled contract
- smart-contract metadata (title, description, version, author,
email, has-storage, has-dynamic-invoke, is-payable)
- smart-contract entry point
- functions
- events
However, this .abi.json file is slightly different from the one,
described in manifest.go, so we have to add auxilaury stractures for
json marshalling. The .abi.json format used by NEO-Express is described
[here](https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.Compiler.MSIL/FuncExport.cs#L66).
2020-04-28 16:39:01 +00:00
|
|
|
},
|
2020-06-25 13:10:08 +00:00
|
|
|
{
|
2020-07-23 13:12:41 +00:00
|
|
|
Name: "methodInt",
|
2020-10-02 10:16:02 +00:00
|
|
|
Offset: 70,
|
2020-06-25 13:10:08 +00:00
|
|
|
Parameters: []manifest.Parameter{
|
|
|
|
{
|
|
|
|
Name: "a",
|
|
|
|
Type: smartcontract.StringType,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
ReturnType: smartcontract.IntegerType,
|
|
|
|
},
|
|
|
|
{
|
2020-07-07 09:01:39 +00:00
|
|
|
Name: "methodString",
|
2020-10-02 10:16:02 +00:00
|
|
|
Offset: 101,
|
2020-06-25 13:10:08 +00:00
|
|
|
Parameters: []manifest.Parameter{},
|
|
|
|
ReturnType: smartcontract.StringType,
|
|
|
|
},
|
|
|
|
{
|
2020-07-07 09:01:39 +00:00
|
|
|
Name: "methodByteArray",
|
2020-10-02 10:16:02 +00:00
|
|
|
Offset: 107,
|
2020-06-25 13:10:08 +00:00
|
|
|
Parameters: []manifest.Parameter{},
|
|
|
|
ReturnType: smartcontract.ByteArrayType,
|
|
|
|
},
|
|
|
|
{
|
2020-07-07 09:01:39 +00:00
|
|
|
Name: "methodArray",
|
2020-10-02 10:16:02 +00:00
|
|
|
Offset: 112,
|
2020-06-25 13:10:08 +00:00
|
|
|
Parameters: []manifest.Parameter{},
|
|
|
|
ReturnType: smartcontract.ArrayType,
|
|
|
|
},
|
|
|
|
{
|
2020-07-07 09:01:39 +00:00
|
|
|
Name: "methodStruct",
|
2020-10-02 10:16:02 +00:00
|
|
|
Offset: 117,
|
2020-06-25 13:10:08 +00:00
|
|
|
Parameters: []manifest.Parameter{},
|
|
|
|
ReturnType: smartcontract.ArrayType,
|
|
|
|
},
|
2020-07-03 09:58:41 +00:00
|
|
|
{
|
2020-07-23 13:12:41 +00:00
|
|
|
Name: "methodConcat",
|
2020-10-02 10:16:02 +00:00
|
|
|
Offset: 92,
|
2020-07-03 09:58:41 +00:00
|
|
|
Parameters: []manifest.Parameter{
|
|
|
|
{
|
|
|
|
Name: "a",
|
|
|
|
Type: smartcontract.StringType,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "b",
|
|
|
|
Type: smartcontract.StringType,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "c",
|
|
|
|
Type: smartcontract.StringType,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
ReturnType: smartcontract.StringType,
|
|
|
|
},
|
2020-08-28 08:08:04 +00:00
|
|
|
{
|
|
|
|
Name: "methodParams",
|
2020-10-02 10:16:02 +00:00
|
|
|
Offset: 129,
|
2020-08-28 08:08:04 +00:00
|
|
|
Parameters: []manifest.Parameter{
|
|
|
|
manifest.NewParameter("addr", smartcontract.Hash160Type),
|
|
|
|
manifest.NewParameter("h", smartcontract.Hash256Type),
|
|
|
|
manifest.NewParameter("sig", smartcontract.SignatureType),
|
|
|
|
manifest.NewParameter("pub", smartcontract.PublicKeyType),
|
|
|
|
manifest.NewParameter("inter", smartcontract.InteropInterfaceType),
|
|
|
|
manifest.NewParameter("ctr", smartcontract.ArrayType),
|
|
|
|
manifest.NewParameter("ctx", smartcontract.InteropInterfaceType),
|
|
|
|
manifest.NewParameter("tx", smartcontract.ArrayType),
|
|
|
|
},
|
|
|
|
ReturnType: smartcontract.BoolType,
|
|
|
|
},
|
2020-06-25 13:10:08 +00:00
|
|
|
},
|
|
|
|
Events: []manifest.Event{},
|
|
|
|
},
|
2020-11-13 18:26:23 +00:00
|
|
|
Groups: []manifest.Group{},
|
2020-06-25 13:10:08 +00:00
|
|
|
Permissions: []manifest.Permission{
|
|
|
|
{
|
|
|
|
Contract: manifest.PermissionDesc{
|
|
|
|
Type: manifest.PermissionWildcard,
|
|
|
|
},
|
|
|
|
Methods: manifest.WildStrings{},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Trusts: manifest.WildUint160s{
|
|
|
|
Value: []util.Uint160{},
|
|
|
|
},
|
|
|
|
SafeMethods: manifest.WildStrings{
|
|
|
|
Value: []string{},
|
compiler: add ability to generate .abi.json file
A part of integration with NEO Blockchain Toolkit (see #902). To be
able to deploy smart-contract compiled with neo-go compiler via NEO
Express, we have to generate additional .abi.json file. This file
contains the following information:
- hash of the compiled contract
- smart-contract metadata (title, description, version, author,
email, has-storage, has-dynamic-invoke, is-payable)
- smart-contract entry point
- functions
- events
However, this .abi.json file is slightly different from the one,
described in manifest.go, so we have to add auxilaury stractures for
json marshalling. The .abi.json format used by NEO-Express is described
[here](https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.Compiler.MSIL/FuncExport.cs#L66).
2020-04-28 16:39:01 +00:00
|
|
|
},
|
2020-06-25 13:10:08 +00:00
|
|
|
Extra: nil,
|
compiler: add ability to generate .abi.json file
A part of integration with NEO Blockchain Toolkit (see #902). To be
able to deploy smart-contract compiled with neo-go compiler via NEO
Express, we have to generate additional .abi.json file. This file
contains the following information:
- hash of the compiled contract
- smart-contract metadata (title, description, version, author,
email, has-storage, has-dynamic-invoke, is-payable)
- smart-contract entry point
- functions
- events
However, this .abi.json file is slightly different from the one,
described in manifest.go, so we have to add auxilaury stractures for
json marshalling. The .abi.json format used by NEO-Express is described
[here](https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.Compiler.MSIL/FuncExport.cs#L66).
2020-04-28 16:39:01 +00:00
|
|
|
}
|
2020-06-25 16:21:49 +00:00
|
|
|
require.ElementsMatch(t, expected.ABI.Methods, actual.ABI.Methods)
|
|
|
|
require.Equal(t, expected.ABI.Events, actual.ABI.Events)
|
|
|
|
require.Equal(t, expected.Groups, actual.Groups)
|
|
|
|
require.Equal(t, expected.Permissions, actual.Permissions)
|
|
|
|
require.Equal(t, expected.Trusts, actual.Trusts)
|
|
|
|
require.Equal(t, expected.SafeMethods, actual.SafeMethods)
|
|
|
|
require.Equal(t, expected.Extra, actual.Extra)
|
compiler: add ability to generate .abi.json file
A part of integration with NEO Blockchain Toolkit (see #902). To be
able to deploy smart-contract compiled with neo-go compiler via NEO
Express, we have to generate additional .abi.json file. This file
contains the following information:
- hash of the compiled contract
- smart-contract metadata (title, description, version, author,
email, has-storage, has-dynamic-invoke, is-payable)
- smart-contract entry point
- functions
- events
However, this .abi.json file is slightly different from the one,
described in manifest.go, so we have to add auxilaury stractures for
json marshalling. The .abi.json format used by NEO-Express is described
[here](https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.Compiler.MSIL/FuncExport.cs#L66).
2020-04-28 16:39:01 +00:00
|
|
|
})
|
2020-03-31 13:16:32 +00:00
|
|
|
}
|
|
|
|
|
2020-03-31 13:57:35 +00:00
|
|
|
func TestSequencePoints(t *testing.T) {
|
|
|
|
src := `package foo
|
|
|
|
func Main(op string) bool {
|
|
|
|
if op == "123" {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}`
|
|
|
|
|
2020-08-10 10:06:06 +00:00
|
|
|
info, err := getBuildInfo("foo.go", src)
|
2020-03-31 13:57:35 +00:00
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
pkg := info.program.Package(info.initialPackage)
|
|
|
|
c := newCodegen(info, pkg)
|
|
|
|
require.NoError(t, c.compile(info, pkg))
|
|
|
|
|
2020-06-24 04:22:33 +00:00
|
|
|
buf := c.prog.Bytes()
|
|
|
|
d := c.emitDebugInfo(buf)
|
2020-03-31 13:57:35 +00:00
|
|
|
require.NotNil(t, d)
|
|
|
|
|
2020-08-10 10:10:35 +00:00
|
|
|
require.Equal(t, d.Documents, []string{"foo.go"})
|
|
|
|
|
2020-03-31 13:57:35 +00:00
|
|
|
// Main func has 2 return on 4-th and 6-th lines.
|
|
|
|
ps := d.Methods[0].SeqPoints
|
|
|
|
require.Equal(t, 2, len(ps))
|
|
|
|
require.Equal(t, 4, ps[0].StartLine)
|
|
|
|
require.Equal(t, 6, ps[1].StartLine)
|
|
|
|
}
|
|
|
|
|
2020-03-31 12:56:10 +00:00
|
|
|
func TestDebugInfo_MarshalJSON(t *testing.T) {
|
|
|
|
d := &DebugInfo{
|
2020-06-24 05:55:24 +00:00
|
|
|
Documents: []string{"/path/to/file"},
|
2020-03-31 12:56:10 +00:00
|
|
|
Methods: []MethodDebugInfo{
|
|
|
|
{
|
|
|
|
ID: "id1",
|
|
|
|
Name: DebugMethodName{
|
|
|
|
Namespace: "default",
|
|
|
|
Name: "method1",
|
|
|
|
},
|
|
|
|
Range: DebugRange{Start: 10, End: 20},
|
|
|
|
Parameters: []DebugParam{
|
|
|
|
{"param1", "Integer"},
|
|
|
|
{"ok", "Boolean"},
|
|
|
|
},
|
2020-07-29 09:13:07 +00:00
|
|
|
ReturnType: "ByteString",
|
2020-03-31 12:56:10 +00:00
|
|
|
Variables: []string{},
|
|
|
|
SeqPoints: []DebugSeqPoint{
|
|
|
|
{
|
|
|
|
Opcode: 123,
|
|
|
|
Document: 1,
|
|
|
|
StartLine: 2,
|
|
|
|
StartCol: 3,
|
|
|
|
EndLine: 4,
|
|
|
|
EndCol: 5,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Events: []EventDebugInfo{},
|
|
|
|
}
|
|
|
|
|
|
|
|
testserdes.MarshalUnmarshalJSON(t, d, new(DebugInfo))
|
|
|
|
}
|