use of com.google.security.zynamics.binnavi.disassembly.types.BaseTypeHelpers.WalkResult in project binnavi by google.
the class BaseTypeHelpersTests method testFindMemberPointerType1.
@Test
public void testFindMemberPointerType1() {
final WalkResult result = BaseTypeHelpers.findMember(typeSystem.uintPointerType, 1);
assertNotNull(result);
assertFalse(result.isValid());
assertNull(result.getMember());
assertNull(result.getPath());
assertEquals("", result.getPathString());
}
use of com.google.security.zynamics.binnavi.disassembly.types.BaseTypeHelpers.WalkResult in project binnavi by google.
the class BaseTypeHelpersTests method testFindMemberStructType5.
@Test
public void testFindMemberStructType5() {
final WalkResult result = BaseTypeHelpers.findMember(typeSystem.simpleStruct, 352);
assertNotNull(result);
assertTrue(result.isValid());
assertEquals(typeSystem.ssArrayMember, result.getMember());
assertEquals(Lists.newArrayList(typeSystem.ssArrayMember), result.getPath());
assertEquals("SimpleStruct.ss_array_member[9]", result.getPathString());
}
use of com.google.security.zynamics.binnavi.disassembly.types.BaseTypeHelpers.WalkResult in project binnavi by google.
the class BaseTypeHelpersTests method testFindMemberNestedStructType1.
@Test
public void testFindMemberNestedStructType1() {
final WalkResult result = BaseTypeHelpers.findMember(typeSystem.doubleNestedStruct, 0);
assertNotNull(result);
assertTrue(result.isValid());
assertEquals(typeSystem.nsIntMember, result.getMember());
assertEquals(Lists.newArrayList(typeSystem.dnsNestedStructMember, typeSystem.nsIntMember), result.getPath());
assertEquals("DoubleNestedStruct.dns_nested_struct_member.ns_int_member", result.getPathString());
}
use of com.google.security.zynamics.binnavi.disassembly.types.BaseTypeHelpers.WalkResult in project binnavi by google.
the class BaseTypeHelpersTests method testFindMemberStructType1.
@Test
public void testFindMemberStructType1() {
final WalkResult result = BaseTypeHelpers.findMember(typeSystem.simpleStruct, 0);
assertNotNull(result);
assertTrue(result.isValid());
assertEquals(typeSystem.ssIntMember, result.getMember());
assertEquals(Lists.newArrayList(typeSystem.ssIntMember), result.getPath());
assertEquals("SimpleStruct.ss_int_member", result.getPathString());
}
use of com.google.security.zynamics.binnavi.disassembly.types.BaseTypeHelpers.WalkResult in project binnavi by google.
the class BaseTypeHelpersTests method testFindMemberNestedStructType8.
@Test
public void testFindMemberNestedStructType8() {
final WalkResult result = BaseTypeHelpers.findMember(typeSystem.doubleNestedStruct, 96 + 320 + 32);
assertNotNull(result);
assertTrue(result.isValid());
assertEquals(typeSystem.dnsPointerMember, result.getMember());
assertEquals(Lists.newArrayList(typeSystem.dnsPointerMember), result.getPath());
assertEquals(typeSystem.doubleNestedStruct.getName() + "." + typeSystem.dnsPointerMember.getName(), result.getPathString());
}
Aggregations