aoc2024/day-22/internal/randomiser/randomiser_internal_test.go
2024-12-22 22:00:38 +00:00

20 lines
341 B
Go

package randomiser
import "testing"
func TestRandomiserMix(t *testing.T) {
r := New(42)
r.mix(15)
if r.secret != 37 {
t.Errorf("r.secret: got = %d want = 37", r.secret)
}
}
func TestRandomiserPrune(t *testing.T) {
r := New(10e7)
r.prune()
if r.secret != 16113920 {
t.Errorf("r.secret: got = %d want = 16113920", r.secret)
}
}