| 44 | } |
| 45 | |
| 46 | TEST_METHOD(MemInfoMultiple) |
| 47 | { |
| 48 | MemStatic memStatic = MemStatic(); |
| 49 | MemoryRegion* region = new MemoryRegion("test", 0x1000, 0x1000, "rwx"); |
| 50 | memStatic.AddMemoryRegion(0x1000, region); |
| 51 | Assert::IsTrue(memStatic.ExistMemoryRegion(0x1000)); |
| 52 | Assert::IsFalse(memStatic.ExistMemoryRegion(0x2000)); |
| 53 | |
| 54 | MemoryRegion* region2 = new MemoryRegion("test2", 0x2000, 0x1000, "rwx"); |
| 55 | memStatic.AddMemoryRegion(0x2000, region2); |
| 56 | Assert::IsTrue(memStatic.ExistMemoryRegion(0x2000)); |
| 57 | Assert::IsFalse(memStatic.ExistMemoryRegion(0x3000)); |
| 58 | |
| 59 | MemoryRegion* region3 = memStatic.GetMemoryRegion(0x2000); |
| 60 | Assert::IsNotNull(region3); |
| 61 | Assert::AreEqual(region3->name, region2->name); |
| 62 | Assert::AreEqual(region3->addr, region2->addr); |
| 63 | } |
| 64 | |
| 65 | TEST_METHOD(MemInfoUsage) |
| 66 | { |
nothing calls this directly
no test coverage detected