Browse Source

Merge commit '39bd3e6c027a6423d3947c333f5a648419b35abe' into antonfirsov/jpeg-optimization

pull/337/head
Anton Firsov 9 years ago
parent
commit
69f3c555c3
  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