MCPcopy Create free account
hub / github.com/dobin/RedEdr / TEST_METHOD

Function TEST_METHOD

UnitTests/UnitTestProcessInfo.cpp:46–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 8

MemStaticClass · 0.85
FindProcessIdByNameFunction · 0.85
MakeProcessFunction · 0.85
AddMemoryRegionMethod · 0.80
ExistMemoryRegionMethod · 0.80
GetMemoryRegionMethod · 0.80
ResolveStrMethod · 0.80

Tested by

no test coverage detected