L4 briefly pass unit test

This commit is contained in:
Youmu Liu
2026-03-17 20:31:06 +08:00
parent 98d711a3ca
commit dccb815811
13 changed files with 1710 additions and 32 deletions
+3 -3
View File
@@ -41,7 +41,7 @@ namespace StgSharp
public static void TestSwiss()
{
SwissTable swiss = SwissTable.Create();
for (int i = 0; i < 5000; i++)
for (nuint i = 0; i < 5000; i++)
{
Console.Write($"Set {i}: ");
_ = swiss.TryAddOrSet(i, i * 2, out _);
@@ -51,8 +51,8 @@ namespace StgSharp
for (int i = 0; i < 100; i++)
{
Console.Write($"Get {i}: ");
int key = rand.Next(4000, 5000);
if (swiss.TryGet(key, out nint value))
nuint key = (nuint)rand.Next(4000, 5000);
if (swiss.TryGet(key, out nuint value))
{
Console.WriteLine($"Success in get a kvp of ({key},{value})");
} else