Skip to content

Commit f7f3a24

Browse files
authored
[WIP] Verifier Testing Framework (#48)
* support default question answers * update submodule * added a testing framework for verifiers and primitive test suite for engine-level tests * support for writing MEG files * simplify meg testing logic * start implementing engine IO tests * rename to ConfigureGame * update deps, subs and new lines * add tests for all fs strategies, default asset loading chain and platform independent file lookup (case and separator insensitive) * find file from alternate matches better the engine behavior * complete test for effects * validate for hardcoded effects * fix tests * Added RegisterAndWriteMeg method * to const * indicate path too long * re-order methods * fix empty paths thorw an exception * model repo reports on long paths * fix file lookup for filenames without extensions * reorganize tests * to property * fix wrong asset issued for crc collision * finish repo testing * add crc collision test * fix tests on linux * report improvements * update baseline
1 parent e8dbba9 commit f7f3a24

91 files changed

Lines changed: 4890 additions & 1187 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ModVerify.slnx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
<Folder Name="/PetroglyphTools/">
3939
<Project Path="src/PetroglyphTools/PG.StarWarsGame.Engine.FileSystem.Test/PG.StarWarsGame.Engine.FileSystem.Test.csproj" />
4040
<Project Path="src/PetroglyphTools/PG.StarWarsGame.Engine.FileSystem/PG.StarWarsGame.Engine.FileSystem.csproj" />
41+
<Project Path="src/PetroglyphTools/PG.StarWarsGame.Engine.Test/PG.StarWarsGame.Engine.Test.csproj" />
42+
<Project Path="src/PetroglyphTools/PG.StarWarsGame.Engine.Testing/PG.StarWarsGame.Engine.Testing.csproj" />
4143
<Project Path="src/PetroglyphTools/PG.StarWarsGame.Engine/PG.StarWarsGame.Engine.csproj" />
4244
<Project Path="src/PetroglyphTools/PG.StarWarsGame.Files.ALO/PG.StarWarsGame.Files.ALO.csproj" />
4345
<Project Path="src/PetroglyphTools/PG.StarWarsGame.Files.ChunkFiles/PG.StarWarsGame.Files.ChunkFiles.csproj" />
@@ -46,4 +48,5 @@
4648
<Project Path="src/ModVerify.CliApp/ModVerify.CliApp.csproj" />
4749
<Project Path="src/ModVerify/ModVerify.csproj" />
4850
<Project Path="test/ModVerify.CliApp.Test/ModVerify.CliApp.Test.csproj" />
51+
<Project Path="test/ModVerify.Test/ModVerify.Test.csproj" />
4952
</Solution>

src/ModVerify.CliApp/Reporting/BaselineSelector.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private bool TryPromptForEmbeddedBaseline(GameEngineType engineType,
159159
? $"Apply the default baseline for engine '{engineType}' as a base? Findings already covered by it will be excluded from your new baseline."
160160
: $"Do you want to load the default baseline for game engine '{engineType}'?";
161161

162-
if (!ConsoleUtilities.UserYesNoQuestion(question))
162+
if (!ConsoleUtilities.UserYesNoQuestion(question, defaultAnswer: true))
163163
return false;
164164

165165
return TryLoadEmbeddedBaseline(engineType, out baseline, out identifier);
@@ -197,6 +197,6 @@ private bool ShouldUseBaseline(VerificationBaseline baseline, string baselinePat
197197
? "Use it as a base? Findings already covered by it will be excluded from your new baseline."
198198
: "Do you want to use it?";
199199
Console.ResetColor();
200-
return ConsoleUtilities.UserYesNoQuestion(question);
200+
return ConsoleUtilities.UserYesNoQuestion(question, defaultAnswer: true);
201201
}
202202
}

0 commit comments

Comments
 (0)