/external/r8/src/test/java/com/android/tools/r8/utils/ |
D | ArtCommandBuilderTest.java | 8 import com.android.tools.r8.ToolHelper; 9 import com.android.tools.r8.ToolHelper.ArtCommandBuilder; 10 import com.android.tools.r8.ToolHelper.DexVm; 20 Assume.assumeTrue(ToolHelper.artSupported()); in setUp() 26 Assert.assertEquals("/bin/bash " + ToolHelper.getArtBinary(), builder.build()); in noArguments() 31 ToolHelper.ArtCommandBuilder builder = new ToolHelper.ArtCommandBuilder(); in simple() 33 assertEquals("/bin/bash " + ToolHelper.getArtBinary() + " -cp xxx.dex Test", builder.build()); in simple() 38 ToolHelper.ArtCommandBuilder builder = new ToolHelper.ArtCommandBuilder(); in classpath() 40 assertEquals("/bin/bash " + ToolHelper.getArtBinary() + " -cp xxx.dex:yyy.jar", in classpath() 46 ToolHelper.ArtCommandBuilder builder = new ToolHelper.ArtCommandBuilder(); in artOptions() [all …]
|
D | D8CommandTest.java | 6 import static com.android.tools.r8.ToolHelper.EXAMPLES_BUILD_DIR; 15 import com.android.tools.r8.ToolHelper; 16 import com.android.tools.r8.ToolHelper.ProcessResult; 34 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 49 assertEquals(0, ToolHelper.getApp(command).getDexProgramResources().size()); in verifyEmptyCommand() 50 assertEquals(0, ToolHelper.getApp(command).getClassProgramResources().size()); in verifyEmptyCommand() 51 assertEquals(0, ToolHelper.getApp(command).getDexLibraryResources().size()); in verifyEmptyCommand() 52 assertEquals(0, ToolHelper.getApp(command).getClassLibraryResources().size()); in verifyEmptyCommand() 53 assertFalse(ToolHelper.getApp(command).hasMainDexList()); in verifyEmptyCommand() 54 assertFalse(ToolHelper.getApp(command).hasProguardMap()); in verifyEmptyCommand() [all …]
|
D | R8CommandTest.java | 6 import static com.android.tools.r8.ToolHelper.EXAMPLES_BUILD_DIR; 15 import com.android.tools.r8.ToolHelper; 16 import com.android.tools.r8.ToolHelper.ProcessResult; 35 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 50 assertEquals(0, ToolHelper.getApp(command).getDexProgramResources().size()); in verifyEmptyCommand() 51 assertEquals(0, ToolHelper.getApp(command).getClassProgramResources().size()); in verifyEmptyCommand() 52 assertEquals(0, ToolHelper.getApp(command).getDexLibraryResources().size()); in verifyEmptyCommand() 53 assertEquals(0, ToolHelper.getApp(command).getClassLibraryResources().size()); in verifyEmptyCommand() 54 assertFalse(ToolHelper.getApp(command).hasMainDexList()); in verifyEmptyCommand() 55 assertFalse(ToolHelper.getApp(command).hasProguardMap()); in verifyEmptyCommand() [all …]
|
D | R8InliningTest.java | 11 import com.android.tools.r8.ToolHelper; 46 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 52 this.keepRulesFile = ToolHelper.EXAMPLES_DIR + this.name + "/keep-rules.txt"; in R8InliningTest() 56 return Paths.get(ToolHelper.EXAMPLES_BUILD_DIR, name + JAR_EXTENSION); in getInputFile() 60 return Paths.get(ToolHelper.EXAMPLES_BUILD_DIR, name, DEFAULT_DEX_FILENAME); in getOriginalDexFile() 88 ToolHelper.runR8(command); in generateR8Version() 89 ToolHelper.runArtNoVerificationErrors(out + "/classes.dex", "inlining.Inlining"); in generateR8Version()
|
/external/r8/src/test/java/com/android/tools/r8/jasmin/ |
D | InvalidClassNames.java | 9 import com.android.tools.r8.ToolHelper; 50 { new String(new int[] { 0x2000 }, 0, 1), !ToolHelper.isWindows() }, in data() 51 { new String(new int[] { 0x200f }, 0, 1), !ToolHelper.isWindows() }, in data() 52 { new String(new int[] { 0x2028 }, 0, 1), !ToolHelper.isWindows() }, in data() 53 { new String(new int[] { 0x202f }, 0, 1), !ToolHelper.isWindows() }, in data() 56 { new String(new int[] { 0xfff0 }, 0, 1), !ToolHelper.isWindows() }, in data() 57 { new String(new int[] { 0xffff }, 0, 1), !ToolHelper.isWindows() }, in data() 59 { "a<b", !ToolHelper.isWindows() }, in data() 60 { "a>b", !ToolHelper.isWindows() }, in data() 61 { "<a>b", !ToolHelper.isWindows() }, in data() [all …]
|
D | JasminTestBase.java | 9 import com.android.tools.r8.ToolHelper; 10 import com.android.tools.r8.ToolHelper.ProcessResult; 39 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 50 return ToolHelper.runJava(ImmutableList.of(out.getPath()), main); in runOnJavaRaw() 71 return ToolHelper.runD8(builder.build()); in compileWithD8() 105 return ToolHelper.runDX(args.toArray(new String[args.size()])); in runDx() 123 return ToolHelper.runArtNoVerificationErrors(dex.toString(), main); in runOnArtDx() 129 return ToolHelper.runArtNoVerificationErrors(ImmutableList.of(out.toString()), main, null); in runOnArt()
|
D | InvalidDebugInfoTests.java | 8 import com.android.tools.r8.ToolHelper; 70 String expected = "42" + ToolHelper.LINE_SEPARATOR + "0" + ToolHelper.LINE_SEPARATOR; in testInvalidInfoThrow() 119 String expected = "42" + ToolHelper.LINE_SEPARATOR; in testInvalidInfoBug37722432()
|
D | TryCatchStateTests.java | 8 import com.android.tools.r8.ToolHelper; 53 String expected = "0" + ToolHelper.LINE_SEPARATOR + "6"; in testTryCatchStackHeight() 101 String expected = "12" + ToolHelper.LINE_SEPARATOR + "21"; in testTryCatchLocals() 152 String expected = "12" + ToolHelper.LINE_SEPARATOR + "21"; in testTryCatchOnUnreachableLabel()
|
/external/r8/src/test/java/com/android/tools/r8/ |
D | TestBase.java | 9 import com.android.tools.r8.ToolHelper.ProcessResult; 50 builder.addProgramFiles(ToolHelper.getClassFileForTestClass(clazz)); in readClasses() 70 new FileInputStream(ToolHelper.getClassFileForTestClass(clazz).toFile())) { in jarTestClasses() 92 R8Command command = ToolHelper.prepareR8CommandBuilder(readClasses(classes)).build(); in compileWithR8() 93 return ToolHelper.runR8(command); in compileWithR8() 101 R8Command command = ToolHelper.prepareR8CommandBuilder(readClasses(classes)).build(); in compileWithR8() 102 return ToolHelper.runR8(command); in compileWithR8() 110 R8Command command = ToolHelper.prepareR8CommandBuilder(readClasses(classes)).build(); in compileWithR8() 111 return ToolHelper.runR8(command, optionsConsumer); in compileWithR8() 119 R8Command command = ToolHelper.prepareR8CommandBuilder(app).build(); in compileWithR8() [all …]
|
D | R8RunSmaliTestsTest.java | 8 import com.android.tools.r8.ToolHelper.DexVm; 34 private static final String SMALI_DIR = ToolHelper.SMALI_BUILD_DIR; 50 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 107 ToolHelper.runR8(originalDexFile.getCanonicalPath(), outputPath); in SmaliTest() 109 if (!ToolHelper.artSupported()) { in SmaliTest() 118 if (originalFailingOnArtVersions.containsKey(ToolHelper.getDexVm()) in SmaliTest() 119 && originalFailingOnArtVersions.get(ToolHelper.getDexVm()).contains(directoryName)) { in SmaliTest() 120 output = ToolHelper.runArtNoVerificationErrors(generated, mainClass); in SmaliTest() 122 if (failingOnArtVersions.containsKey(ToolHelper.getDexVm()) in SmaliTest() 123 && failingOnArtVersions.get(ToolHelper.getDexVm()).contains(directoryName)) { in SmaliTest() [all …]
|
D | RunExamplesAndroidNTest.java | 12 import com.android.tools.r8.ToolHelper.DexVm; 13 import com.android.tools.r8.ToolHelper.ProcessResult; 34 private static final String EXAMPLE_DIR = ToolHelper.EXAMPLES_ANDROID_N_BUILD_DIR; 77 if (!ToolHelper.artSupported()) { in run() 82 if (failsOn.containsKey(ToolHelper.getDexVm()) in run() 83 && failsOn.get(ToolHelper.getDexVm()).contains(testName)) { in run() 87 String output = ToolHelper.runArtNoVerificationErrors(out.toString(), qualifiedMainClass); in run() 90 ToolHelper.runJava(ImmutableList.of(inputFile.toString()), qualifiedMainClass); in run() 119 @Rule public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest();
|
D | R8RunExamplesTest.java | 14 import com.android.tools.r8.ToolHelper.DexVm; 43 private static final String EXAMPLE_DIR = ToolHelper.EXAMPLES_BUILD_DIR; 47 private static final Set<DexVm> artVersions = ToolHelper.getArtVersions(); 130 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 176 ToolHelper.runD8(D8Command.builder() in compile() 184 ToolHelper.runR8(R8Command.builder() in compile() 198 if (!ToolHelper.artSupported()) { in outputIsIdentical() 217 ToolHelper.ProcessResult javaResult = in outputIsIdentical() 218 ToolHelper.runJava(ImmutableList.of(getOriginalJarFile().toString()), mainClass); in outputIsIdentical() 235 ToolHelper.checkArtOutputIdentical(original, generated.toString(), mainClass, version); in outputIsIdentical()
|
D | R8EntryPointTests.java | 7 import com.android.tools.r8.ToolHelper.ProcessResult; 26 Paths.get(ToolHelper.EXAMPLES_BUILD_DIR, "minification" + FileUtils.JAR_EXTENSION); 28 Paths.get(ToolHelper.EXAMPLES_DIR, "minification", "keep-rules.txt"); 89 ProcessResult r8 = ToolHelper.forkR8(Paths.get("."), in testMainDir() 90 "--lib", ToolHelper.getDefaultAndroidJar(), in testMainDir() 104 ProcessResult r8 = ToolHelper.forkR8(Paths.get("."), in testMainZip() 105 "--lib", ToolHelper.getDefaultAndroidJar(), in testMainZip() 118 .addLibraryFiles(Paths.get(ToolHelper.getDefaultAndroidJar())) in getCommand()
|
D | RunExamplesAndroidOTest.java | 14 import com.android.tools.r8.ToolHelper.DexVm; 41 static final String EXAMPLE_DIR = ToolHelper.EXAMPLES_ANDROID_O_BUILD_DIR; 122 if (!ToolHelper.artSupported()) { in run() 138 String output = ToolHelper.runArtNoVerificationErrors(out.toString(), qualifiedMainClass); in run() 140 ToolHelper.ProcessResult javaResult = in run() 141 ToolHelper.runJava(ImmutableList.of(inputFile.toString()), qualifiedMainClass); in run() 199 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 204 boolean failsOn(Map<ToolHelper.DexVm, List<String>> failsOn, String name) { in failsOn() 205 return failsOn.containsKey(ToolHelper.getDexVm()) in failsOn() 206 && failsOn.get(ToolHelper.getDexVm()).contains(name); in failsOn()
|
D | R8CodeCanonicalizationTest.java | 35 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 40 int numberOfCodes = readNumberOfCodes(Paths.get(ToolHelper.EXAMPLES_BUILD_DIR + SOURCE_DEX)); in testNumberOfCodeItemsUnchanged() 41 ToolHelper.runR8(ToolHelper.EXAMPLES_BUILD_DIR + SOURCE_DEX, temp.getRoot().getCanonicalPath()); in testNumberOfCodeItemsUnchanged()
|
/external/r8/src/test/java/com/android/tools/r8/dex/ |
D | ExtraFileTest.java | 8 import com.android.tools.r8.ToolHelper; 25 private static final String EXAMPLE_DIR = ToolHelper.EXAMPLES_BUILD_DIR; 33 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 38 if (!ToolHelper.artSupported()) { in splitMemberRebindingTwoFiles() 44 Path packageMap = Paths.get(ToolHelper.EXAMPLES_DIR, EXAMPLE_PACKAGE_MAP); in splitMemberRebindingTwoFiles() 45 Path proguardMap = Paths.get(ToolHelper.EXAMPLES_DIR, EXAMPLE_PROGUARD_MAP); in splitMemberRebindingTwoFiles() 54 ToolHelper.runR8(command); in splitMemberRebindingTwoFiles() 62 ToolHelper.checkArtOutputIdentical( in splitMemberRebindingTwoFiles()
|
/external/r8/src/test/java/com/android/tools/r8/jar/UnicodeSetRegression/ |
D | UnicodeSetRegressionTest.java | 7 import com.android.tools.r8.ToolHelper; 29 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 32 return ToolHelper.runDexer(JAR_FILE, temp.newFolder("dx-dex").getPath()); in dexFromDX() 40 ToolHelper.runR8(dexFromDX(), combinedInput); in testUnicodeSetFromDex() 41 ToolHelper.runDex2Oat(combinedInput, oatFile); in testUnicodeSetFromDex() 49 AndroidApp result = ToolHelper.runR8(JAR_FILE, combinedInput.toString()); in testUnicodeSetFromJar() 51 ToolHelper.runDex2Oat(combinedInput, oatFile); in testUnicodeSetFromJar() 53 AndroidApp fromDexApp = ToolHelper.runR8(dexFromDX()); in testUnicodeSetFromJar()
|
/external/r8/src/test/java/com/android/tools/r8/debuginfo/ |
D | DebugInfoTestBase.java | 11 import com.android.tools.r8.ToolHelper; 12 import com.android.tools.r8.ToolHelper.ProcessResult; 27 Paths.get(ToolHelper.BUILD_DIR, "test", "debuginfo_examples_dex.jar"); 35 builder.addProgramFiles(ToolHelper.getClassFileForTestClass(clazz)); in compileWithD8() 37 return ToolHelper.runD8(builder.setMode(CompilationMode.DEBUG).build()); in compileWithD8() 54 return ToolHelper.runArtNoVerificationErrors(ImmutableList.of(out.toString()), main, null); in runOnArt() 58 ProcessResult result = ToolHelper.runJava(clazz); in runOnJava()
|
D | LocalsInSwitchTestRunner.java | 8 import com.android.tools.r8.ToolHelper; 21 String expected = "55" + ToolHelper.LINE_SEPARATOR + "1862" + ToolHelper.LINE_SEPARATOR in testLocalsInSwitch() 22 + "15130" + ToolHelper.LINE_SEPARATOR; in testLocalsInSwitch()
|
/external/r8/src/test/java/com/android/tools/r8/rewrite/longcompare/ |
D | RequireNonNullRewriteTest.java | 10 import com.android.tools.r8.ToolHelper; 11 import com.android.tools.r8.ToolHelper.ArtCommandBuilder; 12 import com.android.tools.r8.ToolHelper.ProcessResult; 33 public TemporaryFolder tmpOutputDir = ToolHelper.getTemporaryFolderForTest(); 47 ArtCommandBuilder builder = new ArtCommandBuilder(ToolHelper.getDexVm()); in runTest() 51 String output = ToolHelper.runArt(builder); in runTest() 52 ProcessResult javaResult = ToolHelper in runTest() 74 final Path inputPath = Paths.get(ToolHelper.EXAMPLES_BUILD_DIR + "/rewrite.jar"); in runTest()
|
D | LongCompare.java | 9 import com.android.tools.r8.ToolHelper; 10 import com.android.tools.r8.ToolHelper.ArtCommandBuilder; 33 public TemporaryFolder tmpOutputDir = ToolHelper.getTemporaryFolderForTest(); 41 ArtCommandBuilder builder = new ArtCommandBuilder(ToolHelper.getDexVm()); in runTest() 45 String output = ToolHelper.runArt(builder); in runTest() 55 final Path inputPath = Paths.get(ToolHelper.EXAMPLES_BUILD_DIR + "/rewrite.jar"); in testLongCompareIsRewritten()
|
/external/r8/src/test/java/com/android/tools/r8/maindexlist/ |
D | MainDexTracingTest.java | 12 import com.android.tools.r8.ToolHelper; 32 private static final String EXAMPLE_BUILD_DIR = ToolHelper.EXAMPLES_BUILD_DIR; 33 private static final String EXAMPLE_O_BUILD_DIR = ToolHelper.EXAMPLES_ANDROID_O_BUILD_DIR; 34 private static final String EXAMPLE_SRC_DIR = ToolHelper.EXAMPLES_DIR; 35 private static final String EXAMPLE_O_SRC_DIR = ToolHelper.EXAMPLES_ANDROID_O_DIR; 37 @Rule public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 133 Paths.get(ToolHelper.getAndroidJar(minSdk))) in doTest() 137 CompilationResult result = ToolHelper.runR8WithFullResult(command, optionsConsumer); in doTest()
|
/external/r8/src/test/java/com/android/tools/r8/d8/ |
D | DexVersionTests.java | 10 import com.android.tools.r8.ToolHelper; 24 Paths.get(ToolHelper.EXAMPLES_BUILD_DIR + "/arithmetic.jar"); 27 Paths.get(ToolHelper.EXAMPLES_BUILD_DIR + "/arrayaccess.jar"); 29 @Rule public TemporaryFolder defaultApiFolder1 = ToolHelper.getTemporaryFolderForTest(); 30 @Rule public TemporaryFolder defaultApiFolder2 = ToolHelper.getTemporaryFolderForTest(); 31 @Rule public TemporaryFolder androidOApiFolder1 = ToolHelper.getTemporaryFolderForTest(); 32 @Rule public TemporaryFolder androidOApiFolder2 = ToolHelper.getTemporaryFolderForTest(); 33 @Rule public TemporaryFolder androidNApiFolder1 = ToolHelper.getTemporaryFolderForTest(); 34 @Rule public TemporaryFolder androidNApiFolder2 = ToolHelper.getTemporaryFolderForTest();
|
/external/r8/src/test/java/com/android/tools/r8/classmerging/ |
D | ClassMergingTest.java | 5 import com.android.tools.r8.ToolHelper; 20 private static final Path EXAMPLE_JAR = Paths.get(ToolHelper.EXAMPLES_BUILD_DIR) 22 private static final Path EXAMPLE_KEEP = Paths.get(ToolHelper.EXAMPLES_DIR) 26 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 32 ToolHelper.runR8( in runR8()
|
/external/r8/src/test/java/com/android/tools/r8/internal/ |
D | CompilationTestBase.java | 13 import com.android.tools.r8.ToolHelper; 37 public TemporaryFolder temp = ToolHelper.getTemporaryFolderForTest(); 53 return checkVerification(ToolHelper.runD8(command), referenceApk); in runAndCheckVerification() 76 outputApp = ToolHelper.runR8(builder.build(), in runAndCheckVerification() 84 ToolHelper.runD8( in runAndCheckVerification() 100 ToolHelper.runDex2Oat(out, oatFile); in checkVerification()
|