a is the log returned by the test, b is the expected log
(t *testing.T, a []Tuple, b []string)
| 1087 | |
| 1088 | // a is the log returned by the test, b is the expected log |
| 1089 | func 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 | |
| 1100 | func (vm *VM) recoverExec(prog []byte) (err error) { |
| 1101 | defer vm.recoverError(&err) |
no test coverage detected