feudal/sequence/serial_test.go

19 lines
341 B
Go
Raw Normal View History

2024-04-04 19:43:46 +00:00
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package sequence
import(
"testing"
)
func TestNewSerial32(t *testing.T) {
counter := NewSerial32()
for i := 0; i < 9; i++ {
counter()
}
r := counter()
if r != 10 {
t.Errorf("Serial counter returned incorrect value: %d != 10", r)
}
}