Search in sources :

Example 1 with CMemorySectionWrapper

use of com.google.security.zynamics.binnavi.Gui.Debug.MemorySectionPanel.CMemorySectionWrapper in project binnavi by google.

the class CMemorySectionWrapperTest method testSimple.

@Test
public void testSimple() {
    assertEquals("00000000 - 000003FE (1023 bytes)", new CMemorySectionWrapper(new MemorySection(new CAddress(0), new CAddress(1022))).toString());
    assertEquals("00000000 - 000003FF (1.00 KB)", new CMemorySectionWrapper(new MemorySection(new CAddress(0), new CAddress(1023))).toString());
    assertEquals("00000000 - 000005DC (1.47 KB)", new CMemorySectionWrapper(new MemorySection(new CAddress(0), new CAddress(1500))).toString());
    assertEquals("00000000 - 00102710 (1.01 MB)", new CMemorySectionWrapper(new MemorySection(new CAddress(0), new CAddress((1024 * 1024) + 10000))).toString());
}
Also used : MemorySection(com.google.security.zynamics.binnavi.debug.models.processmanager.MemorySection) CMemorySectionWrapper(com.google.security.zynamics.binnavi.Gui.Debug.MemorySectionPanel.CMemorySectionWrapper) CAddress(com.google.security.zynamics.zylib.disassembly.CAddress) Test(org.junit.Test)

Aggregations

CMemorySectionWrapper (com.google.security.zynamics.binnavi.Gui.Debug.MemorySectionPanel.CMemorySectionWrapper)1 MemorySection (com.google.security.zynamics.binnavi.debug.models.processmanager.MemorySection)1 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)1 Test (org.junit.Test)1