Package jadx.tests.smali

Source Code of jadx.tests.smali.TestConstructor

package jadx.tests.smali;

import jadx.core.dex.nodes.ClassNode;
import jadx.tests.api.SmaliTest;

import org.junit.Test;

import static jadx.tests.api.utils.JadxMatchers.containsOne;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.assertThat;

public class TestConstructor extends SmaliTest {

  @Test
  public void test() {
    disableCompilation();
    ClassNode cls = getClassNodeFromSmali("TestConstructor");
    String code = cls.getCode().toString();
    System.out.println(code);

    assertThat(code, containsOne("new SomeObject(arg3);"));
    assertThat(code, not(containsString("= someObject")));
  }
}
TOP

Related Classes of jadx.tests.smali.TestConstructor

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.