Browse Source

WIP on master: 8899f23 Merge pull request #299 from SixLabors/beta-1

af/merge-core
Anton Firsov 9 years ago
parent
commit
924878c64d
  1. 2
      tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs
  2. 6
      tests/ImageSharp.Tests/TestUtilities/ImagingTestCaseUtility.cs

2
tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs

@ -44,7 +44,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
{
SizeF newSize = image.Size() * ratio;
image.Mutate(x => x.Resize((Size)newSize, sampler, false));
string details = $"{name}-{ratio}";
string details = $"{name}-{ratio.ToString(System.Globalization.CultureInfo.InvariantCulture)}";
image.DebugSave(provider, details);
image.CompareToReferenceOutput(provider, details);

6
tests/ImageSharp.Tests/TestUtilities/ImagingTestCaseUtility.cs

@ -111,13 +111,15 @@ namespace SixLabors.ImageSharp.Tests
TypeInfo info = type.GetTypeInfo();
if (info.IsPrimitive || info.IsEnum || type == typeof(decimal))
{
detailsString = testOutputDetails.ToString();
detailsString = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", testOutputDetails);
}
else
{
IEnumerable<PropertyInfo> properties = testOutputDetails.GetType().GetRuntimeProperties();
detailsString = String.Join("_", properties.ToDictionary(x => x.Name, x => x.GetValue(testOutputDetails)).Select(x => $"{x.Key}-{x.Value}"));
detailsString = String.Join(
"_", properties.ToDictionary(x => x.Name, x => string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", x.GetValue(testOutputDetails))).Select(x => $"{x.Key}-{x.Value}")
);
}
}
return this.GetTestOutputFileNameImpl(extension, detailsString, appendPixelTypeToFileName);

Loading…
Cancel
Save