From ca7fc939532399b05d21825f47aaae2da9d11f61 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 21 Nov 2025 11:18:37 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E5=A2=9E=E5=8A=A0=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8F=90=E9=AB=98=E4=BB=A3=E7=A0=81=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- binding/csharp/IP2Region.Net.Test/SearcherTest.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/binding/csharp/IP2Region.Net.Test/SearcherTest.cs b/binding/csharp/IP2Region.Net.Test/SearcherTest.cs index ee8b7be..80a3358 100644 --- a/binding/csharp/IP2Region.Net.Test/SearcherTest.cs +++ b/binding/csharp/IP2Region.Net.Test/SearcherTest.cs @@ -97,12 +97,15 @@ public class SearcherTest [Theory] [InlineData("58.251.255.255", "中国|广东省|深圳市|联通")] - public void Search_UintIp_Ok(string ipStr, string expected) + public void Search_Ip_Ok(string ipStr, string expected) { var fileSearcher = new Searcher(CachePolicy.File, _xdbPathV4); var ipAddress = IPAddress.Parse(ipStr); + var region = fileSearcher.Search(ipAddress); + Assert.Equal(expected, region); + var ip = XDB.Util.IpAddressToUInt32(ipAddress); - var region = fileSearcher.Search(ip); + region = fileSearcher.Search(ip); Assert.Equal(expected, region); }