Beispiel #1
0
        public void ShouldOpenMachO()
        {
            var fileName = Utilities.GetBinaryLocation("simple-mach-o");

            ELFSharp.MachO.MachO machO;
            Assert.AreEqual(MachOResult.OK, MachOReader.TryLoad(fileName, out machO));
        }
Beispiel #2
0
        public void ShouldOpenMachOObjectFile()
        {
            // intermediate object file has only 1 segment.
            var result = MachOReader.TryLoad(Utilities.GetBinaryStream("simple-mach-o-object.o"), true, out ELFSharp.MachO.MachO machO);

            Assert.AreEqual(MachOResult.OK, result);
            Assert.AreEqual(machO.FileType, FileType.Object);
            Assert.AreEqual(machO.GetCommandsOfType <Segment>().Count(), 1);
        }
Beispiel #3
0
        public void ShouldRecognizeFatMachO()
        {
            var result = MachOReader.TryLoad(Utilities.GetBinaryStream("Undecimus"), true, out _);

            Assert.AreEqual(MachOResult.FatMachO, result);
        }
Beispiel #4
0
 public void ShouldOpenMachO()
 {
     Assert.AreEqual(MachOResult.OK,
                     MachOReader.TryLoad(Utilities.GetBinaryStream("simple-mach-o"), true, out _));
 }