Commit 1281ee56 authored by pcregut's avatar pcregut

Updated junit to 4.11 so that we can name parameterized tests.

parent 1e30ffbc
......@@ -4,6 +4,7 @@
<classpathentry kind="src" path="test/conform"/>
<classpathentry kind="src" path="test/perf"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="lib" path="lib/junit-4.10.jar"/>
<classpathentry kind="lib" path="lib/junit-4.11.jar"/>
<classpathentry kind="lib" path="lib/hamcrest-core-1.3.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
......@@ -65,7 +65,7 @@ public class ApplicationWriterTest {
* Parameters for the test : set of files.
* @return collection of dex files
*/
@Parameters
@Parameters(name= "{index}: {0}")
public static Collection<Object[]> data() {
ArrayList<Object[]> data = new ArrayList<Object[]>();
File testCaseFolder;
......@@ -192,8 +192,13 @@ public class ApplicationWriterTest {
String fullGeneratedDexFileName = TestUtil.TEMP_FOLDER_ROOT + TestUtil.FILENAME_GENERATED_DEX;
File createdDexFile = TestUtil.createFileFromByteArray(generatedDexFile, fullGeneratedDexFileName);
// Tests the maps of both the original dex file and the generated one.
assertTrue("Unequal Map between " + dexFileName + " and the generated file.", TestUtil.testMapDexFiles(createdDexFile, dexFile));
boolean isEqualMap = TestUtil.testMapDexFiles(createdDexFile, dexFile);
if (!isEqualMap) {
System.err.println(createdDexFile + " != " + dexFile);
// System.exit(1);
}
// Tests the maps of both the original dex file and the generated one.
assertTrue("Unequal Map between " + dexFileName + " and the generated file.", isEqualMap);
// Executes Baksmali once again to disassemble our generated dex file.
TestUtil.baksmali(new String[] { fullGeneratedDexFileName,
......
......@@ -56,7 +56,7 @@ import java.util.Collection;
@RunWith(Parameterized.class)
public class ApplicationWriterTreeTest {
@Parameters
@Parameters(name= "{index}: {0}")
public static Collection<Object[]> data() {
ArrayList<Object[]> data = new ArrayList<Object[]>();
File testCaseFolder;
......@@ -156,7 +156,6 @@ public class ApplicationWriterTreeTest {
areFolderIdentical = TestUtil.testSmaliFoldersEquality(TestUtil.TEMP_FOLDER_GENERATED,
TestUtil.TEMP_FOLDER_EXPECTED, skipLineNumbers);
assertTrue("Generated .smali files differ.", areFolderIdentical);
TestUtil.removeTemporaryFolder();
}
}
......@@ -68,7 +68,7 @@ import org.ow2.asmdex.util.AsmDexifierApplicationVisitor;
@RunWith(Parameterized.class)
public class AsmDexifierTest {
@Parameters
@Parameters(name= "{index}: {0}")
public static Collection<Object[]> data() {
ArrayList<Object[]> data = new ArrayList<Object[]>();
File testCaseFolder;
......
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