Skip to content

Commit

Permalink
Upgrade test framework packages, drop a compat rule
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Mar 7, 2024
1 parent b33ebc6 commit c2228f2
Show file tree
Hide file tree
Showing 6 changed files with 500 additions and 4,170 deletions.
7 changes: 0 additions & 7 deletions src/Imageflow/CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@
<Right>lib/netstandard2.0/Imageflow.Net.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0009</DiagnosticId>
<Target>T:Imageflow.Fluent.BuildEncodeResult</Target>
<Left>lib/netstandard2.0/Imageflow.Net.dll</Left>
<Right>lib/netstandard2.0/Imageflow.Net.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0009</DiagnosticId>
<Target>T:Imageflow.Fluent.BuildJobResult</Target>
Expand Down
14 changes: 10 additions & 4 deletions tests/Imageflow.Test/Imageflow.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
<ItemGroup>
<PackageReference Include="Imageflow.NativeTool.win-x86" Version="2.0.0-preview8" />
<PackageReference Include="Imageflow.NativeTool.win-x86_64" Version="2.0.0-preview8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170628-02" />
<PackageReference Include="xunit" Version="2.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.extensibility.execution" Version="2.*" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.*" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="[13.0.3,14)" />
<PackageReference Include="coverlet.collector" Version="3.1.0" />
<PackageReference Include="coverlet.collector" Version="6.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.0" Condition="'$(RecyclableMemoryStreamVersion)' != ''" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.0" Condition="'$(RecyclableMemoryStreamVersion)' == ''" />
<PackageReference Include="System.Text.Json" Version="[6.*,)" Condition="'$(SystemTextJsonVersion)' == ''" />
Expand Down
21 changes: 21 additions & 0 deletions tests/Imageflow.Test/TestJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,27 @@ public void TestAllJob()
else
Console.Error.WriteLine(e.ToString());
}

// For using SystemTextJson.JsonDiffPatch, which fails to diff rn, and also requires Json 8.0
// var expectedJson =
// JsonNode.Parse(SortPropertiesRecursive(JsonNode.Parse(expected))!.ToString()); //JsonNode.Parse(expected);
// var actualJson =
// JsonNode.Parse(SortPropertiesRecursive(JsonNode.Parse(jsonStr))!.ToString()); //JsonNode.Parse(jsonStr);
// try
// {
// JsonAssert.Equal(expectedJson, actualJson);
//
// }
// catch (Exception e)
// {
// Console.Error.WriteLine("Expected: " + expectedJson);
// Console.Error.WriteLine("Actual: " + actualJson);
// // Don't throw on CI
// if (Environment.GetEnvironmentVariable("CI") == null)
// throw;
// else
// Console.Error.WriteLine(e.ToString());
// }
}

private static JsonNode? SortPropertiesRecursive(JsonNode? n)
Expand Down
Loading

0 comments on commit c2228f2

Please sign in to comment.