1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Const generic arg fixes

This commit is contained in:
Brian Fiete 2022-04-17 17:46:35 -07:00
parent b9a9a4bfac
commit 2b9443744b
3 changed files with 34 additions and 7 deletions

View file

@ -112,6 +112,15 @@ namespace Tests
public const int N = CalculateN();
}
public static int Test<T>(T param1, params Span<int> param2)
where T : const String
{
int total = param1.Length;
for (int val in param2)
total += val;
return total;
}
[Test]
public static void TestBasics()
{
@ -126,6 +135,7 @@ namespace Tests
Test.Assert(!iList.SequenceEquals(iSpan));
Test.Assert(BigNum<const 3>.N == 3);
Test.Assert(Test("test", 1, 2, 3) == 10);
}
}
}