Skip to content

Commit

Permalink
typo: fix a lot of typos (#1555)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gounlaf authored Feb 16, 2024
1 parent 10903b0 commit 3c0dc19
Show file tree
Hide file tree
Showing 43 changed files with 102 additions and 103 deletions.
2 changes: 1 addition & 1 deletion src/Magick.NET.Core/Profiles/Exif/ExifReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private void AddValues(Collection<IExifValue> values, uint index)
}

if (value is null)
_data.InvalidTags.Add(new UnkownExifTag(tag));
_data.InvalidTags.Add(new UnknownExifTag(tag));

_reader.Seek(oldIndex + 4);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace ImageMagick;

internal sealed class UnkownExifTag : ExifTag
internal sealed class UnknownExifTag : ExifTag
{
internal UnkownExifTag(ExifTagValue value)
internal UnknownExifTag(ExifTagValue value)
: base((ushort)value)
{
}
Expand Down
2 changes: 1 addition & 1 deletion src/Magick.NET.Core/Profiles/Exif/Values/ExifValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public ExifValue(ExifTag tag)
=> Tag = tag;

public ExifValue(ExifTagValue tag)
=> Tag = new UnkownExifTag(tag);
=> Tag = new UnknownExifTag(tag);

public abstract ExifDataType DataType { get; }

Expand Down
8 changes: 4 additions & 4 deletions src/Magick.NET.SourceGenerator/CodeBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ internal sealed class CodeBuilder

public void Append(int value)
{
AppendIdentation();
AppendIndentation();
_builder.Append(value);
}

public void Append(params string?[] values)
{
AppendIdentation();
AppendIndentation();

foreach (var value in values)
_builder.Append(value);
Expand Down Expand Up @@ -57,7 +57,7 @@ public void AppendReturnsComment(string comment)
public void AppendLine(params string?[] values)
{
if (values.Length > 0)
AppendIdentation();
AppendIndentation();

foreach (var value in values)
_builder.Append(value);
Expand All @@ -82,7 +82,7 @@ public void AppendQuantumType()
public override string ToString()
=> _builder.ToString();

private void AppendIdentation()
private void AppendIndentation()
{
if (_indentationWritten)
return;
Expand Down
4 changes: 2 additions & 2 deletions src/Magick.NET/Types/PointInfoCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public static void DisposeList(IntPtr instance)
return;
}

var nativeIstance = new NativePointInfoCollection(instance);
nativeIstance.Dispose();
var nativeInstance = new NativePointInfoCollection(instance);
nativeInstance.Dispose();
}

public void Dispose()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Magick.NET.Core.Tests;

public partial class EndianReaderTests
{
public class TheSeekMetod
public class TheSeekMethod
{
[Fact]
public void ShouldReturnFalseWhenIndexIsTooHigh()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public void ShouldReturnEmptyArrayWhenAllValuesAreInvalid()

var profile = new ExifProfile(bytes);

var unkownTag = new ExifTag<uint>((ExifTagValue)298);
var value = profile.GetValue<uint>(unkownTag);
var unknownTag = new ExifTag<uint>((ExifTagValue)298);
var value = profile.GetValue<uint>(unknownTag);
Assert.Equal(42U, value.GetValue());
Assert.Equal("42", value.ToString());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class ImageProfileTests
public class TheGetDataMethod
{
[Fact]
public void ShouldReturNullWhenDataIsNull()
public void ShouldReturnNullWhenDataIsNull()
{
var profile = new TestProfile();
var bytes = profile.GetData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class TheSetValueMethod
[InlineData(IptcTag.Contact)]
[InlineData(IptcTag.LocalCaption)]
[InlineData(IptcTag.CaptionWriter)]
public void ShouldAllowDuplicateValuesForValuesThatCanBeRepated(IptcTag tag)
public void ShouldAllowDuplicateValuesForValuesThatCanBeRepeated(IptcTag tag)
{
var profile = new IptcProfile();
var expectedValue1 = "test";
Expand Down Expand Up @@ -77,7 +77,7 @@ public void ShouldAllowDuplicateValuesForValuesThatCanBeRepated(IptcTag tag)
[InlineData(IptcTag.Caption)]
[InlineData(IptcTag.ImageType)]
[InlineData(IptcTag.ImageOrientation)]
public void ShoulNotdAllowDuplicateValuesForValuesThatCannotBeRepated(IptcTag tag)
public void ShouldNotAllowDuplicateValuesForValuesThatCannotBeRepeated(IptcTag tag)
{
var profile = new IptcProfile();
var expectedValue = "another one";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class ThresholdTests
public class TheToStringMethod
{
[Fact]
public void ShouldReturnSingleValueWhenOnlyMimimumIsSet()
public void ShouldReturnSingleValueWhenOnlyMinimumIsSet()
{
var point = new Threshold(1.2);
Assert.Equal("1.2", point.ToString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void ShouldNotAllowValueAbove100Percent()
}

[Fact]
public void ShouldMultplyAllNonAlphaChannelsForRgbColor()
public void ShouldMultiplyAllNonAlphaChannelsForRgbColor()
{
var color = MagickColors.White;
var percentage = new Percentage(50);
Expand All @@ -104,7 +104,7 @@ public void ShouldMultplyAllNonAlphaChannelsForRgbColor()
}

[Fact]
public void ShouldMultplyAllNonAlphaChannelsForCmykColor()
public void ShouldMultiplyAllNonAlphaChannelsForCmykColor()
{
var color = new MagickColor("cmyka(100%,100%,100%,100%)");
var percentage = new Percentage(50);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Magick.NET.Tests;

public partial class MagickFactoryTests
{
public class TheConfigurationfilesProperty
public class TheConfigurationFilesProperty
{
[Fact]
public void ShouldReturnInstance()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class MagickFactoryTests
public class TheQuantumInfoProperty
{
[Fact]
public void ShouldHaveTheCorrectDephValue()
public void ShouldHaveTheCorrectDepthValue()
{
var factory = new MagickFactory();
#if Q8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ public async Task ShouldCreateMagickImage()

var settings = new PixelReadSettings(2, 1, StorageType.Double, PixelMapping.RGBA);

using var temporaryFile = new TemporaryFile(data);
using var image = await factory.CreateAsync(temporaryFile.File.FullName, settings);
using var tempFile = new TemporaryFile(data);
using var image = await factory.CreateAsync(tempFile.File.FullName, settings);

Assert.IsType<MagickImage>(image);
Assert.Equal(2, image.Width);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void ShouldSetTheDefine()
}

[Fact]
public void ShouldEncodeTheImagArarithmetic()
public void ShouldEncodeTheImageArithmetic()
{
var defines = new JpegWriteDefines
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Magick.NET.Tests;

public partial class TiffReadDefinesTests
{
public class TheIgnoreExifPopertiesProperty
public class TheIgnoreExifPropertiesProperty
{
[Fact]
public void ShouldSetTheDefine()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class TemporaryDefinesTests
public class TheSetArtifactMethod
{
[Fact]
public void ShouldSetArtificatWhenValueIsNotNull()
public void ShouldSetArtifactWhenValueIsNotNull()
{
using var image = new MagickImage();
using var temporaryDefines = new TemporaryDefines(image);
Expand All @@ -21,7 +21,7 @@ public void ShouldSetArtificatWhenValueIsNotNull()
}

[Fact]
public void ShouldNotSetArtificatWhenValueIsNull()
public void ShouldNotSetArtifactWhenValueIsNull()
{
using var image = new MagickImage();
using var temporaryDefines = new TemporaryDefines(image);
Expand All @@ -31,7 +31,7 @@ public void ShouldNotSetArtificatWhenValueIsNull()
}

[Fact]
public void ShouldNotSetArtificatWhenValueIsEmpty()
public void ShouldNotSetArtifactWhenValueIsEmpty()
{
using var image = new MagickImage();
using var temporaryDefines = new TemporaryDefines(image);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public async Task ShouldThrowExceptionWhenFileIsNull()
public async Task ShouldUseTheSpecifiedFormat()
{
using var input = new MagickImageCollection(Files.CirclePNG);
using var tempfile = new TemporaryFile("foobar");
await input.WriteAsync(tempfile.File, MagickFormat.Tiff);
using var tempFile = new TemporaryFile("foobar");
await input.WriteAsync(tempFile.File, MagickFormat.Tiff);

using var output = new MagickImageCollection(tempfile.File);
using var output = new MagickImageCollection(tempFile.File);

Assert.Single(output);
Assert.Equal(MagickFormat.Tiff, output[0].Format);
Expand Down Expand Up @@ -90,17 +90,17 @@ public async Task ShouldThrowExceptionWhenDefinesIsNull()
public async Task ShouldUseTheSpecifiedFormat()
{
using var input = new MagickImageCollection(Files.CirclePNG);
using var tempfile = new TemporaryFile("foobar");
using var tempFile = new TemporaryFile("foobar");
var defines = new TiffWriteDefines()
{
Endian = Endian.MSB,
};
await input.WriteAsync(tempfile.File, defines);
await input.WriteAsync(tempFile.File, defines);

Assert.Equal(MagickFormat.Png, input[0].Format);

using var output = new MagickImageCollection();
await output.ReadAsync(tempfile.File);
await output.ReadAsync(tempFile.File);

Assert.Single(output);
Assert.Equal(MagickFormat.Tiff, output[0].Format);
Expand Down Expand Up @@ -164,11 +164,11 @@ public async Task ShouldThrowExceptionWhenFileIsNull()
public async Task ShouldUseTheSpecifiedFormat()
{
using var input = new MagickImageCollection(Files.CirclePNG);
using var tempfile = new TemporaryFile("foobar");
using var tempFile = new TemporaryFile("foobar");

await input.WriteAsync(tempfile.File.FullName, MagickFormat.Tiff);
await input.WriteAsync(tempFile.File.FullName, MagickFormat.Tiff);

using var output = new MagickImageCollection(tempfile.File.FullName);
using var output = new MagickImageCollection(tempFile.File.FullName);

Assert.Single(output);
Assert.Equal(MagickFormat.Tiff, output[0].Format);
Expand Down Expand Up @@ -198,17 +198,17 @@ public async Task ShouldThrowExceptionWhenDefinesIsNull()
public async Task ShouldUseTheSpecifiedFormat()
{
using var input = new MagickImageCollection(Files.CirclePNG);
using var tempfile = new TemporaryFile("foobar");
using var tempFile = new TemporaryFile("foobar");
var defines = new TiffWriteDefines()
{
Endian = Endian.MSB,
};
await input.WriteAsync(tempfile.File.FullName, defines);
await input.WriteAsync(tempFile.File.FullName, defines);

Assert.Equal(MagickFormat.Png, input[0].Format);

using var output = new MagickImageCollection();
await output.ReadAsync(tempfile.File.FullName);
await output.ReadAsync(tempFile.File.FullName);

Assert.Single(output);
Assert.Equal(MagickFormat.Tiff, output[0].Format);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ public void ShouldUseTheSpecifiedFormat()
Endian = Endian.MSB,
};
using var input = new MagickImageCollection(Files.CirclePNG);
using var tempfile = new TemporaryFile("foobar");
input.Write(tempfile.File, defines);
using var tempFile = new TemporaryFile("foobar");
input.Write(tempFile.File, defines);

Assert.Equal(MagickFormat.Png, input[0].Format);

using var output = new MagickImageCollection();
output.Read(tempfile.File);
output.Read(tempFile.File);

Assert.Single(output);
Assert.Equal(MagickFormat.Tiff, output[0].Format);
Expand Down Expand Up @@ -132,12 +132,12 @@ public void ShouldThrowExceptionWhenFileIsNull()
public void ShouldUseTheSpecifiedFormat()
{
using var input = new MagickImageCollection(Files.CirclePNG);
using var tempfile = new TemporaryFile("foobar");
input.Write(tempfile.File.FullName, MagickFormat.Tiff);
using var tempFile = new TemporaryFile("foobar");
input.Write(tempFile.File.FullName, MagickFormat.Tiff);

Assert.Equal(MagickFormat.Png, input[0].Format);

using var output = new MagickImageCollection(tempfile.File.FullName);
using var output = new MagickImageCollection(tempFile.File.FullName);

Assert.Single(output);
Assert.Equal(MagickFormat.Tiff, output[0].Format);
Expand Down Expand Up @@ -167,17 +167,17 @@ public void ShouldThrowExceptionWhenDefinesIsNull()
public void ShouldUseTheSpecifiedFormat()
{
using var input = new MagickImageCollection(Files.CirclePNG);
using var tempfile = new TemporaryFile("foobar");
using var tempFile = new TemporaryFile("foobar");
var defines = new TiffWriteDefines()
{
Endian = Endian.MSB,
};
input.Write(tempfile.File.FullName, defines);
input.Write(tempFile.File.FullName, defines);

Assert.Equal(MagickFormat.Png, input[0].Format);

using var output = new MagickImageCollection();
output.Read(tempfile.File.FullName);
output.Read(tempFile.File.FullName);

Assert.Single(output);
Assert.Equal(MagickFormat.Tiff, output[0].Format);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void ShouldThrowExceptionWhenFileNameIsInvalid()
public class WithFileNameAndReadSettings
{
[Fact]
public void ShouldUseTheReadsettings()
public void ShouldUseTheReadSettings()
{
var imageInfo = new MagickImageInfo();
var settings = new MagickReadSettings(new BmpReadDefines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class MagickImageTests
public class TheBlueShiftMethod
{
[Fact]
public void ShouldSimulateNightimeScene()
public void ShouldSimulateNighttimeScene()
{
using var image = new MagickImage(Files.Builtin.Logo);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class MagickImageTests
public class TheBrightnessContrastMethod
{
[Fact]
public void ShouldChangeBrightnesAndContrastOfTheImage()
public void ShouldChangeBrightnessAndContrastOfTheImage()
{
using var image = new MagickImage(Files.Builtin.Wizard);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void ShouldThrowExceptionWhenMatrixIsNull()
}

[Fact]
public void SouldApplyTheSpecifiedColorMatrix()
public void ShouldApplyTheSpecifiedColorMatrix()
{
using var image = new MagickImage(Files.Builtin.Rose);
var matrix = new MagickColorMatrix(3, 0, 0, 1, 0, 1, 0, 1, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void ShouldThrowExceptionWhenHeightIsNegative()
}

[Fact]
public void ShouldCreateTilesOfTheSpeciedSize()
public void ShouldCreateTilesOfTheSpecifiedSize()
{
using var image = new MagickImage(Files.Builtin.Logo);
var tiles = image.CropToTiles(48, 48).ToArray();
Expand Down
Loading

0 comments on commit 3c0dc19

Please sign in to comment.