mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 22:54:14 +00:00
a45a7cc2d3
Pokewalker: defer match if shiny Jacq egg: recognize unhatched egg, traded sv-pokedex-old: don't add rows for >1010 species (out of range) static9: correctly flag scale mismatch SAV4HGSS: expose pokegear #'s as span instead of alloc
33 lines
782 B
C#
33 lines
782 B
C#
using System;
|
|
using System.IO;
|
|
|
|
namespace PKHeX.Core.Tests;
|
|
|
|
internal static class TestUtil
|
|
{
|
|
public static string GetRepoPath()
|
|
{
|
|
var folder = Directory.GetCurrentDirectory();
|
|
while (!folder.EndsWith(nameof(Tests)))
|
|
{
|
|
var dir = Directory.GetParent(folder);
|
|
ArgumentNullException.ThrowIfNull(dir);
|
|
folder = dir.FullName;
|
|
}
|
|
return folder;
|
|
}
|
|
|
|
private static readonly object InitLock = new();
|
|
private static bool IsInitialized;
|
|
|
|
public static void InitializeLegality()
|
|
{
|
|
lock (InitLock)
|
|
{
|
|
if (IsInitialized)
|
|
return;
|
|
RibbonStrings.ResetDictionary(GameInfo.Strings.ribbons);
|
|
IsInitialized = true;
|
|
}
|
|
}
|
|
}
|