L4 briefly pass unit test
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user