fix: forbid to change types for methods arguments

This commit is contained in:
Skylot
2019-02-11 19:19:41 +03:00
parent 89563b624b
commit b689efcc9f
9 changed files with 81 additions and 49 deletions
@@ -56,13 +56,13 @@ public class TestTryCatchFinally6 extends IntegrationTest {
String code = cls.getCode().toString();
assertThat(code, containsLines(2,
"FileInputStream fileInputStream = null;",
"InputStream inputStream = null;",
"try {",
indent() + "call();",
indent() + "fileInputStream = new FileInputStream(\"1.txt\");",
indent() + "inputStream = new FileInputStream(\"1.txt\");",
"} finally {",
indent() + "if (fileInputStream != null) {",
indent() + indent() + "fileInputStream.close();",
indent() + "if (inputStream != null) {",
indent() + indent() + "inputStream.close();",
indent() + "}",
"}"
));
@@ -24,7 +24,7 @@ public class TestVariablesGeneric extends SmaliTest {
@Test
public void test() {
disableCompilation();
ClassNode cls = getClassNodeFromSmaliWithPath("variables", "TestVariablesGeneric");
ClassNode cls = getClassNodeFromSmaliWithPkg("variables", "TestVariablesGeneric");
String code = cls.getCode().toString();
assertThat(code, not(containsString("iVar2")));
@@ -1,4 +1,4 @@
.class public LTestVariablesGeneric;
.class public Lvariables/TestVariablesGeneric;
.super Ljava/lang/Object;
.source "SourceFile"