示例#1
0
        public void LoadELF3_Success()
        {
            Memory    RAM = new Memory(32768);
            ELFLoader elf = new ELFLoader();

            elf.ReadELF(ref RAM, Directory.GetCurrentDirectory() + "\\Test Files\\test3.exe");

            int sum = RAM.CalculateChecksum();

            Assert.IsTrue(sum == 536861199);
        }
示例#2
0
        public void LoadELF_NoFile()
        {
            Memory    RAM = new Memory(2084);
            ELFLoader elf = new ELFLoader();

            try
            {
                elf.ReadELF(ref RAM, Directory.GetCurrentDirectory() + "\\Test Files\\IdoNotExist.exe");
                Assert.Fail();
            }
            catch (Exception e)
            {
                Assert.IsTrue(e.Message.Contains("does not exist"));
            }
        }