Skip to content

Commit

Permalink
Add OSABIVersion and Type tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fjeremic committed Dec 19, 2019
1 parent 04639e7 commit 98e9709
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions BinaryTools.Elf.Tests/TestElfHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,25 @@ public void CorrectOSABI()

Assert.Equal(ElfOSABI.None, elfFile.Header.OSABI);
}

[Fact]
public void CorrectOSABIVersion()
{
var stream = new FileStream("Binaries/base32", FileMode.Open, FileAccess.Read);
var reader = new EndianBinaryReader(stream, EndianBitConverter.NativeEndianness);
ElfFile elfFile = ElfFile.ReadElfFile(reader);

Assert.Equal(0, elfFile.Header.OSABIVersion);
}

[Fact]
public void CorrectFlags()
{
var stream = new FileStream("Binaries/base32", FileMode.Open, FileAccess.Read);
var reader = new EndianBinaryReader(stream, EndianBitConverter.NativeEndianness);
ElfFile elfFile = ElfFile.ReadElfFile(reader);

Assert.Equal(0U, elfFile.Header.Flags);
}
}
}

0 comments on commit 98e9709

Please sign in to comment.