-
-
Notifications
You must be signed in to change notification settings - Fork 894
Harden memory-intensive tests, repurpose Sandbox46 #1089
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
Changes from 20 commits
a2e22a8
964f12b
adc8928
1b6cc28
beb8a51
97396e6
3e33bb3
ec3809e
57542c9
f55533d
2da044b
78aed16
9089e3c
f5c5b00
e6f8d46
6f832aa
2cb6567
87f002e
a1ed205
84b850d
e115ba6
b823860
23b9423
4519c55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,13 @@ | ||
| param( | ||
| [Parameter(Mandatory, Position = 0)] | ||
| [string]$version, | ||
| [Parameter(Mandatory = $false, Position = 1)] | ||
| [string]$targetFramework = 'ALL' | ||
| [Parameter(Mandatory = $true, Position = 1)] | ||
| [string]$targetFramework | ||
| ) | ||
|
|
||
| dotnet clean -c Release | ||
|
|
||
| $repositoryUrl = "https://github.com/$env:GITHUB_REPOSITORY" | ||
| if ($targetFramework -ne 'ALL') { | ||
|
|
||
| # Building for a specific framework. | ||
| dotnet build -c Release -f $targetFramework /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl | ||
| } | ||
| else { | ||
|
|
||
| # Building for packing and publishing. | ||
| dotnet pack -c Release --output "$PSScriptRoot/artifacts" /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl | ||
| } | ||
| # Building for a specific framework. | ||
| dotnet build -c Release -f $targetFramework /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| param( | ||
| [Parameter(Mandatory, Position = 0)] | ||
| [string]$version | ||
| ) | ||
|
|
||
| dotnet clean -c Release | ||
|
|
||
| $repositoryUrl = "https://github.com/$env:GITHUB_REPOSITORY" | ||
|
|
||
| # Building for packing and publishing. | ||
| dotnet pack -c Release --output "$PSScriptRoot/artifacts" /p:packageversion=$version /p:RepositoryUrl=$repositoryUrl |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ## ImageSharp.Tests.ProfilingSandbox | ||
| Helper project to run and profile unit tests or other "sandbox" code from a single .exe entry point. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| // Copyright (c) Six Labors and contributors. | ||
| // Licensed under the Apache License, Version 2.0. | ||
|
|
||
| using System.Runtime.CompilerServices; | ||
|
|
||
| [assembly:InternalsVisibleTo("ImageSharp.Tests.ProfilingSandbox")] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| using SixLabors.ImageSharp.ColorSpaces; | ||
| using SixLabors.ImageSharp.ColorSpaces.Conversion; | ||
| using Xunit; | ||
| using Xunit.Abstractions; | ||
|
|
||
| namespace SixLabors.ImageSharp.Tests.Colorspaces.Conversion | ||
| { | ||
|
|
@@ -21,6 +22,24 @@ public class RgbAndHslConversionTest | |
| private static readonly ColorSpaceConverter Converter = new ColorSpaceConverter(); | ||
| private static readonly ApproximateColorSpaceComparer ColorSpaceComparer = new ApproximateColorSpaceComparer(.0001F); | ||
|
|
||
| public static TheoryData<float, float, float, float, float, float> Hsl_To_Rgb | ||
| = new TheoryData<float, float, float, float, float, float> | ||
| { | ||
| { 0, 0, 0, 0, 0, 0 }, | ||
| { 0, 1, 1, 1, 1, 1 }, | ||
| { 360, 1, 1, 1, 1, 1 }, | ||
| { 0, 1, .5F, 1, 0, 0 }, | ||
| { 120, 1, .5F, 0, 1, 0 }, | ||
| { 240, 1, .5F, 0, 0, 1 } | ||
| }; | ||
|
|
||
| private readonly ITestOutputHelper output; | ||
|
|
||
| public RgbAndHslConversionTest(ITestOutputHelper output) | ||
| { | ||
| this.output = output; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Tests conversion from <see cref="Hsl"/> to <see cref="Rgb"/>. | ||
| /// </summary> | ||
|
|
@@ -31,6 +50,8 @@ public class RgbAndHslConversionTest | |
| [InlineData(0, 1, .5F, 1, 0, 0)] | ||
| [InlineData(120, 1, .5F, 0, 1, 0)] | ||
| [InlineData(240, 1, .5F, 0, 0, 1)] | ||
| //[Theory] | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this WIP stuff now here?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was just added to generate all the required info for coverlet-coverage/coverlet#700 I'll remove it |
||
| //[MemberData(nameof(Hsl_To_Rgb))] | ||
| public void Convert_Hsl_To_Rgb(float h, float s, float l, float r, float g, float b) | ||
| { | ||
| // Arrange | ||
|
|
@@ -54,6 +75,8 @@ public void Convert_Hsl_To_Rgb(float h, float s, float l, float r, float g, floa | |
| { | ||
| Assert.Equal(expected, actualSpan[i], ColorSpaceComparer); | ||
| } | ||
|
|
||
| this.output.WriteLine("Verifying Convert_Hsl_To_Rgb is run"); | ||
| } | ||
|
|
||
| /// <summary> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.