From 82a164e3b929d9a0f339dfa95dacfec03ae49e90 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Fri, 22 Dec 2017 10:23:16 -0800 Subject: [PATCH] mvcc: make test struct fields unexported Signed-off-by: Gyuho Lee --- mvcc/watcher_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mvcc/watcher_test.go b/mvcc/watcher_test.go index f08e7db09..ad5b54d7a 100644 --- a/mvcc/watcher_test.go +++ b/mvcc/watcher_test.go @@ -92,9 +92,9 @@ func TestWatcherRequestsCustomID(t *testing.T) { // - Make sure the auto-assignment skips over things we manually assigned tt := []struct { - GivenID WatchID - ExpectedID WatchID - ExpectedErr error + givenID WatchID + expectedID WatchID + expectedErr error }{ {1, 1, nil}, {1, 0, ErrWatcherDuplicateID}, @@ -103,13 +103,13 @@ func TestWatcherRequestsCustomID(t *testing.T) { } for i, tcase := range tt { - id, err := w.Watch(tcase.GivenID, []byte("foo"), nil, 0) - if tcase.ExpectedErr != nil || err != nil { - if err != tcase.ExpectedErr { - t.Errorf("expected get error %q in test case %q, got %q", tcase.ExpectedErr, i, err) + id, err := w.Watch(tcase.givenID, []byte("foo"), nil, 0) + if tcase.expectedErr != nil || err != nil { + if err != tcase.expectedErr { + t.Errorf("expected get error %q in test case %q, got %q", tcase.expectedErr, i, err) } - } else if tcase.ExpectedID != id { - t.Errorf("expected to create ID %d, got %d in test case %d", tcase.ExpectedID, id, i) + } else if tcase.expectedID != id { + t.Errorf("expected to create ID %d, got %d in test case %d", tcase.expectedID, id, i) } } }