Commit a5a951cf authored by Ahmed Ashour's avatar Ahmed Ashour Committed by skylot

test: add test case for #535 (PR #545)

parent a6f935ed
......@@ -27,9 +27,6 @@ import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
......
package jadx.tests.integration.variables;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.Test;
import jadx.NotYetImplemented;
import jadx.core.dex.nodes.ClassNode;
import jadx.tests.api.IntegrationTest;
public class TestVariables7 extends IntegrationTest {
public static class TestCls {
public void test() {
List list;
synchronized (this) {
list = new ArrayList();
}
for (Object o : list) {
System.out.println(o);
}
}
}
@Test
@NotYetImplemented
public void test() {
ClassNode cls = getClassNode(TestCls.class);
String code = cls.getCode().toString();
assertThat(code, containsString(" list = new ArrayList"));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment