Commit 099e8e7f authored by protolambda's avatar protolambda

mipsevm: clean up solutil test logging

parent 748773f1
......@@ -158,7 +158,6 @@ func ParseSourceMap(sources []string, bytecode []byte, sourceMap string) (*Sourc
if instIndex >= len(instructions) {
// truncated source-map? Or some instruction that's longer than we accounted for?
// probably the contract-metadata bytes that are not accounted for in source map
fmt.Printf("out of instructions: %d\n", instIndex-len(instructions))
} else {
instMapping = instructions[instIndex]
}
......
package mipsevm
import (
"fmt"
"strings"
"testing"
"github.com/stretchr/testify/require"
......@@ -13,6 +13,9 @@ func TestSourcemap(t *testing.T) {
srcMap, err := contract.SourceMap([]string{"../contracts/src/MIPS.sol"})
require.NoError(t, err)
for i := 0; i < len(contract.DeployedBytecode.Object); i++ {
fmt.Println(srcMap.FormattedInfo(uint64(i)) + ": test")
info := srcMap.FormattedInfo(uint64(i))
if !strings.HasPrefix(info, "generated:") && !strings.HasPrefix(info, "../contracts/src/MIPS.sol") {
t.Fatalf("unexpected info: %q", info)
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment