-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- updated to NET9 / C# 13 - compatible with PKHeX 24.11.11 - updated workflows - more clean up
- Loading branch information
1 parent
81be811
commit ea3bd36
Showing
42 changed files
with
677 additions
and
629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "nuget" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 1 | ||
allow: | ||
- dependency-name: "PKHeX.Core" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: PR Test | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
paths-ignore: | ||
- '.github/**' | ||
- '*.md' | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: windows-latest | ||
|
||
env: | ||
PROJECT_NAME: WC3Plugin | ||
DOTNET_VERSION: 9.0.x | ||
OUT_DIR: build | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
- name: Restore Dependencies | ||
run: dotnet restore | ||
- name: Build Release | ||
run: dotnet build ${{ env.PROJECT_NAME }} --no-restore --configuration Release -o ${{ env.OUT_DIR }} | ||
- name: Run Tests | ||
run: dotnet test --no-restore --verbosity normal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,152 +1,151 @@ | ||
using NUnit.Framework; | ||
using Xunit; | ||
using PKHeX.Core; | ||
using WC3Plugin; | ||
|
||
namespace Test | ||
namespace Test; | ||
|
||
public class ECBTest | ||
{ | ||
public class ECBTest | ||
[Fact] | ||
public void ImportEmeraldEnglish() | ||
{ | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.EM_EN}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.EM_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3E sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.True(sav.HasECB()); | ||
Assert.Equal(sav.Write(), expected); | ||
} | ||
[Fact] | ||
public void ImportEmeraldJapanese() | ||
{ | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.EM_JP}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.EM_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3E sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.True(sav.HasECB()); | ||
Assert.Equal(sav.Write(), expected); | ||
} | ||
|
||
[Fact] | ||
public void ImportRSEnglish() | ||
{ | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.RS_EN}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.RS_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_RS_EN}"); | ||
|
||
SAV3RS sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.True(sav.HasECB()); | ||
Assert.Equal(sav.Write(), expected); | ||
} | ||
[Fact] | ||
public void ImportRSJapanese() | ||
{ | ||
[Test] | ||
public void ImportEmeraldEnglish() | ||
{ | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.EM_EN}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.EM_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3E sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.That(sav.HasECB(), Is.True); | ||
Assert.That(sav.Write(), Is.EqualTo(expected)); | ||
} | ||
[Test] | ||
public void ImportEmeraldJapanese() | ||
{ | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.EM_JP}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.EM_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3E sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.That(sav.HasECB(), Is.True); | ||
Assert.That(sav.Write(), Is.EqualTo(expected)); | ||
} | ||
|
||
[Test] | ||
public void ImportRSEnglish() | ||
{ | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.RS_EN}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.RS_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_RS_EN}"); | ||
|
||
SAV3RS sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.That(sav.HasECB(), Is.True); | ||
Assert.That(sav.Write(), Is.EqualTo(expected)); | ||
} | ||
[Test] | ||
public void ImportRSJapanese() | ||
{ | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.RS_JP}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.RS_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_RS_EN}"); | ||
|
||
SAV3RS sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.That(sav.HasECB(), Is.True); | ||
Assert.That(sav.Write(), Is.EqualTo(expected)); | ||
} | ||
|
||
[Test] | ||
public void ImportFRLGEnglish() | ||
{ | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.FRLG_EN}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.FRLG_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3FRLG sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.That(sav.HasECB(), Is.True); | ||
Assert.That(sav.Write(), Is.EqualTo(expected)); | ||
} | ||
[Test] | ||
public void ImportFRLGJapanese() | ||
{ | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.FRLG_JP}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.FRLG_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3FRLG sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.That(sav.HasECB(), Is.True); | ||
Assert.That(sav.Write(), Is.EqualTo(expected)); | ||
} | ||
|
||
|
||
[Test] | ||
public void ExportEmeraldEnglish() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.EM_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3E sav = new(sav_ecb); | ||
|
||
Assert.That(ecb, Is.EqualTo(sav.ExportECB())); | ||
} | ||
[Test] | ||
public void ExportEmeraldJapanese() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.EM_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3E sav = new(sav_ecb); | ||
|
||
Assert.That(ecb, Is.EqualTo(sav.ExportECB())); | ||
} | ||
[Test] | ||
public void ExportRSEnglish() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.RS_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_RS_EN}"); | ||
|
||
SAV3RS sav = new(sav_ecb); | ||
|
||
Assert.That(ecb, Is.EqualTo(sav.ExportECB())); | ||
} | ||
[Test] | ||
public void ExportRSJapanese() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.RS_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_RS_EN}"); | ||
|
||
SAV3RS sav = new(sav_ecb); | ||
|
||
Assert.That(ecb, Is.EqualTo(sav.ExportECB())); | ||
} | ||
[Test] | ||
public void ExportFRLGEnglish() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.FRLG_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3FRLG sav = new(sav_ecb); | ||
|
||
Assert.That(ecb, Is.EqualTo(sav.ExportECB())); | ||
} | ||
[Test] | ||
public void ExportFRLGJapanese() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.FRLG_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3FRLG sav = new(sav_ecb); | ||
|
||
Assert.That(ecb, Is.EqualTo(sav.ExportECB())); | ||
} | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.RS_JP}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.RS_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_RS_EN}"); | ||
|
||
SAV3RS sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.True(sav.HasECB()); | ||
Assert.Equal(sav.Write(), expected); | ||
} | ||
|
||
[Fact] | ||
public void ImportFRLGEnglish() | ||
{ | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.FRLG_EN}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.FRLG_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3FRLG sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.True(sav.HasECB()); | ||
Assert.Equal(sav.Write(), expected); | ||
} | ||
[Fact] | ||
public void ImportFRLGJapanese() | ||
{ | ||
byte[] clean = File.ReadAllBytes($"{Data.CleanSavesDir}{Data.FRLG_JP}"); | ||
byte[] expected = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.FRLG_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3FRLG sav = new(clean); | ||
sav.ImportECB(ecb); | ||
|
||
Assert.True(sav.HasECB()); | ||
Assert.Equal(sav.Write(), expected); | ||
} | ||
|
||
|
||
[Fact] | ||
public void ExportEmeraldEnglish() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.EM_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3E sav = new(sav_ecb); | ||
|
||
Assert.Equal(ecb, sav.ExportECB()); | ||
} | ||
[Fact] | ||
public void ExportEmeraldJapanese() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.EM_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3E sav = new(sav_ecb); | ||
|
||
Assert.Equal(ecb, sav.ExportECB()); | ||
} | ||
[Fact] | ||
public void ExportRSEnglish() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.RS_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_RS_EN}"); | ||
|
||
SAV3RS sav = new(sav_ecb); | ||
|
||
Assert.Equal(ecb, sav.ExportECB()); | ||
} | ||
[Fact] | ||
public void ExportRSJapanese() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.RS_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_RS_EN}"); | ||
|
||
SAV3RS sav = new(sav_ecb); | ||
|
||
Assert.Equal(ecb, sav.ExportECB()); | ||
} | ||
[Fact] | ||
public void ExportFRLGEnglish() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.FRLG_EN_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3FRLG sav = new(sav_ecb); | ||
|
||
Assert.Equal(ecb, sav.ExportECB()); | ||
} | ||
[Fact] | ||
public void ExportFRLGJapanese() | ||
{ | ||
byte[] sav_ecb = File.ReadAllBytes($"{Data.ExpectedSavesDir}{Data.FRLG_JP_ECB}"); | ||
byte[] ecb = File.ReadAllBytes($"{Data.MysteryDataDir}{Data.Berry_EM_EN}"); | ||
|
||
SAV3FRLG sav = new(sav_ecb); | ||
|
||
Assert.Equal(ecb, sav.ExportECB()); | ||
} | ||
} |
Oops, something went wrong.