mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-28 13:26:30 -05:00
Switch assert comparison
AreEqual checking by Reference? strip out newlines and compare with string equals instead add testing method for generating full dex of pkm (still WIP hence commented out attributes)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using PKHeX.Core;
|
||||
|
||||
@@ -14,7 +15,8 @@ public class ShowdownSetTests
|
||||
public void SimulatorGetParse()
|
||||
{
|
||||
var set = new ShowdownSet(SetGlaceonUSUMTutor);
|
||||
Assert.AreEqual(SetGlaceonUSUMTutor, set.Text);
|
||||
string Sanitize(string str) => str.Replace("\r\n", "").Replace("\n", "");
|
||||
Assert.IsTrue(Sanitize(SetGlaceonUSUMTutor) == Sanitize(set.Text));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -46,6 +48,22 @@ public void SimulatorGetEncounters()
|
||||
}
|
||||
}
|
||||
|
||||
//[TestMethod]
|
||||
//[TestCategory(SimulatorParse)]
|
||||
public void TestGenerate()
|
||||
{
|
||||
for (int i = 1; i <= 807; i++)
|
||||
{
|
||||
var tr = new SimpleTrainerInfo();
|
||||
var pk = new PK7 { Species = i };
|
||||
var ez = EncounterMovesetGenerator.GeneratePKMs(pk, tr);
|
||||
Debug.WriteLine($"Starting {i:000}");
|
||||
bool v = ez.Select(p => new LegalityAnalysis(p)).All(la => la.Valid);
|
||||
Debug.WriteLine($"Finished {i:000}");
|
||||
Debug.Assert(v);
|
||||
}
|
||||
}
|
||||
|
||||
private const string SetGlaceonUSUMTutor =
|
||||
@"Glaceon (F) @ Assault Vest
|
||||
IVs: 0 Atk
|
||||
|
||||
Reference in New Issue
Block a user