summaryrefslogtreecommitdiff
path: root/tools/ahat/test/NativeAllocationTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ahat/test/NativeAllocationTest.java')
-rw-r--r--tools/ahat/test/NativeAllocationTest.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/ahat/test/NativeAllocationTest.java b/tools/ahat/test/NativeAllocationTest.java
index 7ad4c1d431..9babab903e 100644
--- a/tools/ahat/test/NativeAllocationTest.java
+++ b/tools/ahat/test/NativeAllocationTest.java
@@ -16,12 +16,15 @@
package com.android.ahat;
-import com.android.tools.perflib.heap.Instance;
+import com.android.ahat.heapdump.AhatInstance;
+import com.android.ahat.heapdump.AhatSnapshot;
+import com.android.ahat.heapdump.NativeAllocation;
import java.io.IOException;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertEquals;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
public class NativeAllocationTest {
@Test
@@ -29,9 +32,9 @@ public class NativeAllocationTest {
TestDump dump = TestDump.getTestDump();
AhatSnapshot snapshot = dump.getAhatSnapshot();
- Instance referent = (Instance)dump.getDumpedThing("anObject");
- for (InstanceUtils.NativeAllocation alloc : snapshot.getNativeAllocations()) {
- if (alloc.referent == referent) {
+ AhatInstance referent = dump.getDumpedAhatInstance("anObject");
+ for (NativeAllocation alloc : snapshot.getNativeAllocations()) {
+ if (alloc.referent.equals(referent)) {
assertEquals(42 , alloc.size);
assertEquals(referent.getHeap(), alloc.heap);
assertEquals(0xABCDABCD , alloc.pointer);