Browse Source

Remove invalid test.

pull/1567/head
James Jackson-South 4 years ago
parent
commit
eee14c649f
  1. 6
      src/ImageSharp/Metadata/Profiles/ICC/DataReader/IccDataReader.TagDataEntry.cs
  2. 9
      tests/ImageSharp.Tests/Metadata/Profiles/ICC/IccReaderTests.cs

6
src/ImageSharp/Metadata/Profiles/ICC/DataReader/IccDataReader.TagDataEntry.cs

@ -19,9 +19,7 @@ internal sealed partial class IccDataReader
public IccTagDataEntry ReadTagDataEntry(IccTagTableEntry info) public IccTagDataEntry ReadTagDataEntry(IccTagTableEntry info)
{ {
this.currentIndex = (int)info.Offset; this.currentIndex = (int)info.Offset;
IccTypeSignature type = this.ReadTagDataEntryHeader(); switch (this.ReadTagDataEntryHeader())
switch (type)
{ {
case IccTypeSignature.Chromaticity: case IccTypeSignature.Chromaticity:
return this.ReadChromaticityTagDataEntry(); return this.ReadChromaticityTagDataEntry();
@ -105,7 +103,7 @@ internal sealed partial class IccDataReader
/// <returns>The read signature</returns> /// <returns>The read signature</returns>
public IccTypeSignature ReadTagDataEntryHeader() public IccTypeSignature ReadTagDataEntryHeader()
{ {
var type = (IccTypeSignature)this.ReadUInt32(); IccTypeSignature type = (IccTypeSignature)this.ReadUInt32();
this.AddIndex(4); // 4 bytes are not used this.AddIndex(4); // 4 bytes are not used
return type; return type;
} }

9
tests/ImageSharp.Tests/Metadata/Profiles/ICC/IccReaderTests.cs

@ -37,13 +37,4 @@ public class IccReaderTests
Assert.Equal(header.Size, expected.Size); Assert.Equal(header.Size, expected.Size);
Assert.Equal(header.Version, expected.Version); Assert.Equal(header.Version, expected.Version);
} }
[Fact]
public void ReadProfile_DuplicateEntry()
{
IccProfile output = IccReader.Read(IccTestDataProfiles.ProfileRandomArray);
Assert.Equal(2, output.Entries.Length);
Assert.True(ReferenceEquals(output.Entries[0], output.Entries[1]));
}
} }

Loading…
Cancel
Save