diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2018-11-21 16:44:29 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-11-22 13:49:50 +0100 |
| commit | 582e1f0d1d51b9237d2dedfcb4c1540b849da8c2 (patch) | |
| tree | 0988637cc3c89ac5ed0791073dee453f87cb2bd3 /pkg/ipc/ipc_test.go | |
| parent | 2ee778023a54f301219962a2996da1a2c60a817d (diff) | |
ipc: add ProgInfo struct
This patch add a new struct ProgInfo that for now holds info about each
call in a program []CallInfo, but in the future will be expanded with remote
coverage info. Update all the callers to use the new interface as well.
Diffstat (limited to 'pkg/ipc/ipc_test.go')
| -rw-r--r-- | pkg/ipc/ipc_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/ipc/ipc_test.go b/pkg/ipc/ipc_test.go index 55a8749bb..dba14b190 100644 --- a/pkg/ipc/ipc_test.go +++ b/pkg/ipc/ipc_test.go @@ -103,11 +103,11 @@ func TestExecute(t *testing.T) { if failed { t.Fatalf("program failed:\n%s", output) } - if len(info) == 0 { + if len(info.Calls) == 0 { t.Fatalf("no calls executed:\n%s", output) } - if info[0].Errno != 0 { - t.Fatalf("simple call failed: %v\n%s", info[0].Errno, output) + if info.Calls[0].Errno != 0 { + t.Fatalf("simple call failed: %v\n%s", info.Calls[0].Errno, output) } if len(output) != 0 { t.Fatalf("output on empty program") @@ -152,12 +152,12 @@ func TestParallel(t *testing.T) { err = fmt.Errorf("program failed:\n%s", output) return } - if len(info) == 0 { + if len(info.Calls) == 0 { err = fmt.Errorf("no calls executed:\n%s", output) return } - if info[0].Errno != 0 { - err = fmt.Errorf("simple call failed: %v\n%s", info[0].Errno, output) + if info.Calls[0].Errno != 0 { + err = fmt.Errorf("simple call failed: %v\n%s", info.Calls[0].Errno, output) return } if len(output) != 0 { |
