]> Cypherpunks repositories - gostls13.git/commitdiff
container/ring: add test for Move with empty Ring
authorShawn Smith <shawn.p.smith@gmail.com>
Tue, 31 Dec 2013 10:18:40 +0000 (21:18 +1100)
committerDave Cheney <dave@cheney.net>
Tue, 31 Dec 2013 10:18:40 +0000 (21:18 +1100)
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/46630044

src/pkg/container/ring/ring_test.go

index 099d92b25b2b449c3c93c60a2a2ebb0e7f9cb456..552f0e24b55b964635c24a147c40c59d4b1d5522 100644 (file)
@@ -218,3 +218,11 @@ func TestLinkUnlink(t *testing.T) {
                }
        }
 }
+
+// Test that calling Move() on an empty Ring initializes it.
+func TestMoveEmptyRing(t *testing.T) {
+       var r Ring
+
+       r.Move(1)
+       verify(t, &r, 1, 0)
+}