From f7d9acd05aff69ad19449c200331629cbcbf3a3b Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Wed, 26 Feb 2020 15:28:52 +0000 Subject: [PATCH] Added NetAddressTest --- Facepunch.Steamworks.Test/NetworkingSockets.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Facepunch.Steamworks.Test/NetworkingSockets.cs b/Facepunch.Steamworks.Test/NetworkingSockets.cs index 4b0e6e6..b72734c 100644 --- a/Facepunch.Steamworks.Test/NetworkingSockets.cs +++ b/Facepunch.Steamworks.Test/NetworkingSockets.cs @@ -101,6 +101,20 @@ public async Task NormalEndtoEnd() await Task.WhenAll( server, client ); } + + [TestMethod] + public async Task NetAddressTest() + { + { + var n = NetAddress.From( "127.0.0.1", 12445 ); + Assert.AreEqual( n.ToString(), "127.0.0.1:12445" ); + } + + { + var n = NetAddress.AnyIp( 5543 ); + Assert.AreEqual( n.ToString(), "[::]:5543" ); + } + } } } \ No newline at end of file