summaryrefslogtreecommitdiff
path: root/tools/ahat/test/DiffTest.java
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-06-23 11:13:25 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-06-23 11:13:27 +0000
commit47686f62332c9cfa015c47a1b2acdd60e74e6ea3 (patch)
tree1381be0cee6e43e0540d4bad6bfc3ce899206256 /tools/ahat/test/DiffTest.java
parent2cf565901845e4bafc663c24071c91d13c692858 (diff)
parentd6918e3c8faf5e445950402f7ea56233dd800948 (diff)
Merge "ahat: Improve field diffing."
Diffstat (limited to 'tools/ahat/test/DiffTest.java')
-rw-r--r--tools/ahat/test/DiffTest.java32
1 files changed, 0 insertions, 32 deletions
diff --git a/tools/ahat/test/DiffTest.java b/tools/ahat/test/DiffTest.java
index 52b6b7b3ae..d0349fd178 100644
--- a/tools/ahat/test/DiffTest.java
+++ b/tools/ahat/test/DiffTest.java
@@ -20,7 +20,6 @@ import com.android.ahat.heapdump.AhatHeap;
import com.android.ahat.heapdump.AhatInstance;
import com.android.ahat.heapdump.AhatSnapshot;
import com.android.ahat.heapdump.Diff;
-import com.android.ahat.heapdump.FieldValue;
import com.android.tools.perflib.heap.hprof.HprofClassDump;
import com.android.tools.perflib.heap.hprof.HprofConstant;
import com.android.tools.perflib.heap.hprof.HprofDumpRecord;
@@ -129,35 +128,4 @@ public class DiffTest {
// Diffing should not crash.
Diff.snapshots(snapshot, snapshot);
}
-
- @Test
- public void diffFields() {
- List<FieldValue> a = new ArrayList<FieldValue>();
- a.add(new FieldValue("n0", "t0", null));
- a.add(new FieldValue("n2", "t2", null));
- a.add(new FieldValue("n3", "t3", null));
- a.add(new FieldValue("n4", "t4", null));
- a.add(new FieldValue("n5", "t5", null));
- a.add(new FieldValue("n6", "t6", null));
-
- List<FieldValue> b = new ArrayList<FieldValue>();
- b.add(new FieldValue("n0", "t0", null));
- b.add(new FieldValue("n1", "t1", null));
- b.add(new FieldValue("n2", "t2", null));
- b.add(new FieldValue("n3", "t3", null));
- b.add(new FieldValue("n5", "t5", null));
- b.add(new FieldValue("n6", "t6", null));
- b.add(new FieldValue("n7", "t7", null));
-
- Diff.fields(a, b);
- assertEquals(8, a.size());
- assertEquals(8, b.size());
- for (int i = 0; i < 8; i++) {
- assertEquals(a.get(i), b.get(i).getBaseline());
- assertEquals(b.get(i), a.get(i).getBaseline());
- }
- assertTrue(a.get(1).isPlaceHolder());
- assertTrue(a.get(7).isPlaceHolder());
- assertTrue(b.get(4).isPlaceHolder());
- }
}