コード例 #1
0
        public void RequestMemoryPageTest()
        {
            PhysicalMemory mem = new PhysicalMemory(10);
            MemoryPage     p1  = new MemoryPage(0, 0, "Unit Test", -1);
            MemoryPage     p2  = new MemoryPage(1, 1 * MemoryPage.PAGE_SIZE, "Unit Test", -1);

            mem.AddPage(p1, 0);
            mem.AddPage(p2, 1);
            MemoryPage req = mem.RequestMemoryPage(1);

            Assert.AreEqual(p2, req);
        }