mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-09 14:20:48 +00:00
20 lines
341 B
Go
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)
|
|
}
|
|
}
|