mirror of
https://github.com/alibaba/testable-mock.git
synced 2025-01-25 11:51:15 +08:00
handle binary operator case
This commit is contained in:
parent
48993d7f18
commit
738f2fc431
@ -62,6 +62,16 @@ public class EnableTestableInjectTranslator extends BaseTranslator {
|
||||
super.visitSelect(jcFieldAccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* member() + new Demo() -> n.e.f(this, "member") + n.e.w(Demo.class)
|
||||
*/
|
||||
@Override
|
||||
public void visitBinary(JCBinary jcBinary) {
|
||||
jcBinary.lhs = checkAndExchange(jcBinary.lhs);
|
||||
jcBinary.rhs = checkAndExchange(jcBinary.rhs);
|
||||
super.visitBinary(jcBinary);
|
||||
}
|
||||
|
||||
/**
|
||||
* For member method invocation break point
|
||||
* call(new Demo()) -> call(n.e.w(Demo.class))
|
||||
|
Loading…
Reference in New Issue
Block a user