1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 06:36:30 +09:00

NetConnection.UnsentBytesCount added

This commit is contained in:
lidgren
2010-09-07 06:53:23 +00:00
parent fa3bd2646f
commit c185b3b16f
5 changed files with 55 additions and 3 deletions

View File

@@ -8,12 +8,18 @@ namespace UnitTests
{
public static void Run()
{
NetQueue<int> queue = new NetQueue<int>(8);
NetQueue<int> queue = new NetQueue<int>(4);
queue.Enqueue(1);
queue.Enqueue(2);
queue.Enqueue(3);
int[] arr = queue.ToArray();
if (arr.Length != 3)
throw new Exception("NetQueue.ToArray failure");
if (arr[0] != 1 || arr[1] != 2 || arr[2] != 3)
throw new Exception("NetQueue.ToArray failure");
bool ok;
int a;
@@ -69,6 +75,10 @@ namespace UnitTests
if (queue.Count != 0)
throw new Exception("NetQueue.Clear failed");
int[] arr2 = queue.ToArray();
if (arr2.Length != 0)
throw new Exception("NetQueue.ToArray failure");
Console.WriteLine("NetQueue tests OK");
}
}