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

Update reference images of the regression tests #2527

Merged
merged 8 commits into from
Mar 8, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Mapsui.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{B2DB
Scripts\buildpack.bat = Scripts\buildpack.bat
Scripts\BuildSamplesDocumentation.ps1 = Scripts\BuildSamplesDocumentation.ps1
Scripts\BuildSamplesWebsite.ps1 = Scripts\BuildSamplesWebsite.ps1
Scripts\CopyGeneratedImagesOverOriginalImages.ps1 = Scripts\CopyGeneratedImagesOverOriginalImages.ps1
Scripts\InstallDependencies.cmd = Scripts\InstallDependencies.cmd
Scripts\NugetRestore.cmd = Scripts\NugetRestore.cmd
Scripts\SamplesMapsuiNugetReferences.ps1 = Scripts\SamplesMapsuiNugetReferences.ps1
Scripts\test-image-copier.cmd = Scripts\test-image-copier.cmd
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{45FC7141-9D40-43F2-8EE2-2BF3B37F7557}"
Expand Down
6 changes: 6 additions & 0 deletions Scripts/CopyGeneratedImagesOverOriginalImages.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Run this cmd from the sln folder to copy all generated images over the originals.
# Only do this if you have checked that the generated images are correct.
# Also search the documentation for: rendering tests

Copy-Item -Path ".\Tests\Mapsui.Rendering.Skia.Tests\bin\Debug\net8.0\Resources\Images\GeneratedTest\*" -Destination ".\Tests\Mapsui.Rendering.Skia.Tests\Resources\Images\OriginalTest" -Force
Copy-Item -Path ".\Tests\Mapsui.Rendering.Skia.Tests\bin\Debug\net8.0\Resources\Images\GeneratedRegression\*" -Destination ".\Tests\Mapsui.Rendering.Skia.Tests\Resources\Images\OriginalRegression" -Force
6 changes: 0 additions & 6 deletions Scripts/test-image-copier.cmd

This file was deleted.

5 changes: 3 additions & 2 deletions Tests/Mapsui.Rendering.Skia.Tests/MapRegressionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Mapsui.Samples.Common.Extensions;
using Mapsui.Samples.Common.Maps.Animations;
using Mapsui.Samples.Common.Maps.DataFormats;
using Mapsui.Samples.Common.Maps.Special;
using Mapsui.Samples.Common.PersistentCaches;
using Mapsui.Samples.CustomWidget;
using Mapsui.Tiling;
Expand Down Expand Up @@ -60,7 +61,7 @@ public MapRegressionTests()
.All(e => e.GetType() != f.GetType())).OrderBy(f => f.GetType().FullName),
];

public static object[] ExcludedSamples => _excludedSamples ??= [new AnimatedPointsSample()];
public static object[] ExcludedSamples => _excludedSamples ??= [new AnimatedPointsSample(), new MutatingTriangleSample()];

[Test]
[Retry(5)]
Expand Down Expand Up @@ -131,7 +132,7 @@ public static async Task TestSampleAsync(ISampleBase sample, bool compareImages)
}
else
{
ClassicAssert.IsTrue(MapRendererTests.CompareBitmaps(originalStream, bitmap, 1, 0.99));
ClassicAssert.IsTrue(MapRendererTests.CompareBitmaps(originalStream, bitmap, 1, 0.995));
}
}
else
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.