You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
498 B
22 lines
498 B
4 years ago
|
using System;
|
||
|
using Xunit;
|
||
|
|
||
3 years ago
|
namespace Jellyfin.Extensions.Tests
|
||
4 years ago
|
{
|
||
|
public static class ShuffleExtensionsTests
|
||
|
{
|
||
|
private static readonly Random _rng = new Random();
|
||
|
|
||
|
[Fact]
|
||
|
public static void Shuffle_Valid_Correct()
|
||
|
{
|
||
|
byte[] original = new byte[1 << 6];
|
||
|
_rng.NextBytes(original);
|
||
|
byte[] shuffled = (byte[])original.Clone();
|
||
|
shuffled.Shuffle();
|
||
|
|
||
|
Assert.NotEqual(original, shuffled);
|
||
|
}
|
||
|
}
|
||
|
}
|