From 2c405f98b1d51c5d835f016f57815d304e2cb552 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 4 Mar 2023 19:31:03 -0800 Subject: [PATCH] Deduplicate zh Gen5 met locations StringQualityTests now passes again. --- .../Resources/text/locations/gen5/text_bw2_00000_zh.txt | 4 ++-- Tests/PKHeX.Core.Tests/Util/StringQualityTests.cs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/PKHeX.Core/Resources/text/locations/gen5/text_bw2_00000_zh.txt b/PKHeX.Core/Resources/text/locations/gen5/text_bw2_00000_zh.txt index 904db4038..f4678ac50 100644 --- a/PKHeX.Core/Resources/text/locations/gen5/text_bw2_00000_zh.txt +++ b/PKHeX.Core/Resources/text/locations/gen5/text_bw2_00000_zh.txt @@ -53,7 +53,7 @@ N的城堡 联合塔 泉源洞穴 吹寄洞穴 -矢车森林 +思索之原 天堂之塔 雪花湿地 R9购物广场 @@ -112,8 +112,8 @@ P2实验室 双龙闸口 黑色闸口 白色闸口 +桥梁闸口 道路闸口 -汇合大道 海底遗迹 桧扇市 立涌市 diff --git a/Tests/PKHeX.Core.Tests/Util/StringQualityTests.cs b/Tests/PKHeX.Core.Tests/Util/StringQualityTests.cs index a73e78a16..7f074ec94 100644 --- a/Tests/PKHeX.Core.Tests/Util/StringQualityTests.cs +++ b/Tests/PKHeX.Core.Tests/Util/StringQualityTests.cs @@ -16,6 +16,7 @@ public class StringQualityTests [InlineData("es")] [InlineData("ko")] [InlineData("zh")] + [InlineData("zh2")] public void HasNoDuplicates(string language) { CheckMetLocations(language); @@ -74,7 +75,7 @@ public class StringQualityTests foreach (var (bank, arr) in group.GetAll()) { - var hs = new HashSet(); + var hs = new HashSet(arr.Length); bool sm0 = bank == 0 && name == nameof(GameStrings.Gen7); for (int index = 0; index < arr.Length; index++) { @@ -85,7 +86,7 @@ public class StringQualityTests continue; if (hs.Contains(line)) - duplicates.Add($"{name}\t{line}"); + duplicates.Add($"{name}\t{index}\t{line}"); hs.Add(line); } }