コード例 #1
0
        public void SetContentsOneLoad()
        {
            var bank = new MemoryTestBank(0xFFF0, 0xFFFF);

            bank.SetContents(0xFFF0, new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, 0, 16);
            for (int i = 0; i < 16; i++)
            {
                Assert.That(bank.Memory[i] == (byte)(i + 1), "{0} failed with {1}", i, bank.Memory[i]);
            }
        }
コード例 #2
0
        public void SetContents()
        {
            var bank = new MemoryTestBank(0xFFF0, 0xFFFF);

            for (int i = 0; i < 16; i++)
            {
                bank.SetContents(0xFFF0 + i, new byte[] { (byte)(i + 1) });

                Assert.That(bank.Memory[i] == (byte)(i + 1), "{0} bit failed with {1}", i, bank.Memory[i]);
            }
        }