# HG changeset patch # User Michael Johnson # Date 1680340230 28800 # Sat Apr 01 01:10:30 2023 -0800 # Node ID bb407045b639804ff01dbf7162a54d7ba3858fb9 # Parent ff5806415e6e504d0ecd8132fd318cc854e8bbc9 Add more test cases for XorShift to satisfy Stryker diff --git a/src/Tests/Rngs/XorShiftTests.cs b/src/Tests/Rngs/XorShiftTests.cs --- a/src/Tests/Rngs/XorShiftTests.cs +++ b/src/Tests/Rngs/XorShiftTests.cs @@ -98,6 +98,18 @@ Assert.Equal(17870292117364939007ul, rng4.NextUInt64()); Assert.Equal(17803257930307839ul, rng4.NextUInt64()); Assert.Equal(56233289412778208ul, rng4.NextUInt64()); + + var rng5 = XorShift.Create((0, 0, 0xFF00FF00, 0xFF00FF00)); + Assert.Equal(18374966859414954208ul, rng5.NextUInt64()); + Assert.Equal(18374932770393745183ul, rng5.NextUInt64()); + Assert.Equal(18446497645800134880ul, rng5.NextUInt64()); + Assert.Equal(522373610665879327ul, rng5.NextUInt64()); + + var rng6 = XorShift.Create((0xFF00FF00, 0xFF00FF00, 0, 0)); + Assert.Equal(34089021212671ul, rng6.NextUInt64()); + Assert.Equal(34084860468992ul, rng6.NextUInt64()); + Assert.Equal(17888059160131002112ul, rng6.NextUInt64()); + Assert.Equal(17888059233145446175ul, rng6.NextUInt64()); } [Fact]