()
| 33 | public class ConstVarTest { |
| 34 | |
| 35 | @Test |
| 36 | void test() { |
| 37 | String main = "ConstVar"; |
| 38 | Main.buildWorld("-pp", "-cp", "src/test/resources/world", "--input-classes", main); |
| 39 | JClass jclass = World.get().getClassHierarchy().getClass(main); |
| 40 | jclass.getDeclaredMethods().forEach(m -> { |
| 41 | IR ir = m.getIR(); |
| 42 | IRPrinter.print(ir, System.out); |
| 43 | ir.getVars() |
| 44 | .stream() |
| 45 | .filter(Var::isConst) |
| 46 | .forEach(v -> System.out.println(v + " -> " + v.getConstValue())); |
| 47 | }); |
| 48 | } |
| 49 | } |
nothing calls this directly
no test coverage detected