Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GBAL parser for GBAHawk #2055

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions TASVideos.Parsers/Parsers/Bk2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ public async Task<IParseResult> Parse(Stream file, long length)
["gb3x"] = SystemCodes.GameBoy,
["gb4x"] = SystemCodes.GameBoy,
["gbl"] = SystemCodes.GameBoy,
["gbal"] = SystemCodes.Gba,
["a26"] = SystemCodes.Atari2600,
["a78"] = SystemCodes.Atari7800,
["uze"] = SystemCodes.UzeBox,
Expand Down
10 changes: 10 additions & 0 deletions tests/TASVideos.MovieParsers.Tests/GbmvParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,14 @@ public async Task GBAHawk_NewHeaderValues()
Assert.AreEqual(true, result.Success);
AssertNoWarningsOrErrors(result);
}

[TestMethod]
[DataRow("System-Gbal.gbmv", SystemCodes.Gba)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we already have a test method that you can simply add this DataRow to?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/TASVideos/tasvideos/blob/main/tests/TASVideos.MovieParsers.Tests/Bk2ParserTests.cs#L131
That's in Bk2ParserTests.cs. I thought it would make more sense to put this test in the one for GBAHawk parser.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, mb

public async Task Systems(string filename, string expectedSystem)
{
var result = await _gbmvParser.Parse(Embedded(filename), EmbeddedLength(filename));
Assert.IsTrue(result.Success);
Assert.AreEqual(expectedSystem, result.SystemCode);
AssertNoWarningsOrErrors(result);
}
}
Binary file not shown.
Loading