19 lines
341 B
Go
19 lines
341 B
Go
// 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)
|
|
}
|
|
}
|