mirror of
https://github.com/alibaba/testable-mock.git
synced 2025-01-25 11:51:15 +08:00
fit for frame-full opcode used by jacoco
This commit is contained in:
parent
c76ed2d84a
commit
6a5c817a3a
@ -99,6 +99,8 @@ public class MockClassHandler extends BaseClassWithContextHandler {
|
||||
((IincInsnNode)in).var++;
|
||||
} else if (in instanceof VarInsnNode && ((VarInsnNode)in).var > 0) {
|
||||
((VarInsnNode)in).var++;
|
||||
} else if (in instanceof FrameNode && ((FrameNode)in).type == F_FULL) {
|
||||
((FrameNode)in).local.add(1, targetClassName);
|
||||
}
|
||||
}
|
||||
mn.maxLocals++;
|
||||
|
@ -41,7 +41,7 @@ public class TestableClassTransformer implements ClassFileTransformer {
|
||||
* Just avoid spend time to scan those surely non-user classes Should keep these lists as tiny as possible
|
||||
*/
|
||||
private final String[] WHITELIST_PREFIXES = new String[] {"com/alibaba/testable/demo/"};
|
||||
private final String[] BLACKLIST_PREFIXES = new String[] {"jdk/", "java/", "javax/", "com/sun/",
|
||||
private final String[] BLACKLIST_PREFIXES = new String[] {"jdk/", "java/", "javax/", "sun/", "com/sun/",
|
||||
"org/apache/maven/", "com/alibaba/testable/", "junit/", "org/junit/", "org/testng/"};
|
||||
|
||||
public MockClassParser mockClassParser = new MockClassParser();
|
||||
|
Loading…
Reference in New Issue
Block a user