MCPcopy Create free account
hub / github.com/chain/txvm / compareLogs

Function compareLogs

protocol/txvm/complex_ops_test.go:1089–1098  ·  view source on GitHub ↗

a is the log returned by the test, b is the expected log

(t *testing.T, a []Tuple, b []string)

Source from the content-addressed store, hash-verified

1087
1088// a is the log returned by the test, b is the expected log
1089func compareLogs(t *testing.T, a []Tuple, b []string) {
1090 if len(a) != len(b) {
1091 t.Fatalf("log lengths don't match. Got %v, wanted %v", a, b)
1092 }
1093 for i, aa := range a {
1094 if aa.String() != b[i] {
1095 t.Fatalf("Log mismatch at location %d. Got %v, wanted %v", i, aa, b[i])
1096 }
1097 }
1098}
1099
1100func (vm *VM) recoverExec(prog []byte) (err error) {
1101 defer vm.recoverError(&err)

Callers 1

TestComplexOpcodesFunction · 0.85

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected