solutil_test.go 809 Bytes
Newer Older
1 2 3 4 5 6 7
package srcmap

import (
	"testing"
)

func TestSourcemap(t *testing.T) {
clabby's avatar
clabby committed
8 9
	t.Skip("TODO(clabby): This test is disabled until source IDs have been added to foundry artifacts.")

10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
	// contractsDir := "../../packages/contracts-bedrock"
	// sources := []string{path.Join(contractsDir, "src/cannon/MIPS.sol")}
	// for i, source := range sources {
	// 	sources[i] = path.Join(contractsDir, source)
	// }
	//
	// deployedByteCode := hexutil.MustDecode(bindings.MIPSDeployedBin)
	// srcMap, err := ParseSourceMap(
	// 	sources,
	// 	deployedByteCode,
	// 	bindings.MIPSDeployedSourceMap)
	// require.NoError(t, err)
	//
	// for i := 0; i < len(deployedByteCode); i++ {
	// 	info := srcMap.FormattedInfo(uint64(i))
	// 	if strings.HasPrefix(info, "unknown") {
	// 		t.Fatalf("unexpected info: %q", info)
	// 	}
	// }
29
}