v1.4.4.1 (Blood in the Water Update)

This commit is contained in:
Regalis11
2024-04-24 18:09:05 +03:00
parent 89b91d1c3e
commit ff1b8951a7
397 changed files with 15250 additions and 6479 deletions
@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System;
using Xunit;
@@ -14,8 +14,8 @@ public sealed class GenericToolBoxTests
{
public static Arbitrary<DifferentIdentifierPair> IdentifierPairGenerator()
{
return Arb.From(from Identifier first in Arb.Generate<Identifier>()
from Identifier second in Arb.Generate<Identifier>().Where(second => second != first)
return Arb.From(from Identifier first in Arb.Generate<Identifier>().Where(first => !first.Value.Contains('~'))
from Identifier second in Arb.Generate<Identifier>().Where(second => second != first && !second.Value.Contains('~'))
select new DifferentIdentifierPair(first, second));
}
}
@@ -28,6 +28,9 @@ public sealed class GenericToolBoxTests
public DifferentIdentifierPair(Identifier first, Identifier second)
{
if (first == second) { throw new InvalidOperationException("Identifiers must be different"); }
//tildes have a special meaning in stat identifiers, don't use them
if (first.Value.Contains('~')) { throw new InvalidOperationException($"{first} is not a valid identifier."); }
if (second.Value.Contains('~')) { throw new InvalidOperationException($"{second} is not a valid identifier."); }
First = first;
Second = second;