usage.setLiveIn(3);
assertEquals(f, f.merge(g, /* localsOnly= */false, usage));
}
public void testMergeChangedTypes() {
Frame f = new Frame(4, 4);
f.setLocal(0, Value.make(0, D_INT));
f.setLocal(1, Value.make(0, "Ljava/lang/reflect/Field;"));
f.setLocal(2, Value.make(0, "[Ljava/lang/Object;"));
f.push(Value.make(0, "Ljava/io/Serializable;"));
Frame g = new Frame(4, 4);
g.setLocal(0, Value.make(0, D_INT));
g.setLocal(1, Value.make(0, "Ljava/lang/reflect/AccessibleObject;"));
g.setLocal(2, Value.make(0, "[Ljava/lang/Object;"));
g.push(Value.make(0, "Ljava/lang/Object;"));
Usage usage = new Usage(4);
for (int i = 0; i < 4; i++)
usage.setLiveIn(i);
Frame h = f.merge(g, /* localsOnly= */false, usage);
assertNotSame(f, h);
for (int i = 0; i < 4; i++) {
assertEquals(g.getLocal(i), h.getLocal(i));
}
}