github.com/drone/runner-go@v1.12.0/pipeline/streamer/console/sequence_test.go (about) 1 // Copyright 2019 Drone.IO Inc. All rights reserved. 2 // Use of this source code is governed by the Polyform License 3 // that can be found in the LICENSE file. 4 5 package console 6 7 import "testing" 8 9 func TestSequence(t *testing.T) { 10 c := new(sequence) 11 if got, want := c.curr(), 0; got != want { 12 t.Errorf("Want curr sequence value %d, got %d", want, got) 13 } 14 if got, want := c.next(), 1; got != want { 15 t.Errorf("Want next sequence value %d, got %d", want, got) 16 } 17 if got, want := c.curr(), 1; got != want { 18 t.Errorf("Want curr sequence value %d, got %d", want, got) 19 } 20 }