711 vs 742 but not the same

This commit is contained in:
Adam
2016-01-25 13:44:08 -05:00
parent a0a2054187
commit 951a6699c8
6 changed files with 116 additions and 20 deletions

View File

@@ -57,23 +57,23 @@ public class MapStaticTest
// }
//@Test
public void testAll() throws IOException
{
ClassGroup group1 = JarUtil.loadJar(new File("d:/rs/07/adamin1.jar"));
ClassGroup group2 = JarUtil.loadJar(new File("d:/rs/07/adamin2.jar"));
for (String[] s : methods)
{
String[] one = s[0].split("\\."), two = s[1].split("\\.");
Method m1 = group1.findClass(one[0]).findMethod(one[1]);
Method m2 = group2.findClass(two[0]).findMethod(two[1]);
ParallelExecutorMapping mappings = MappingExecutorUtil.map(m1, m2);
}
}
// public void testAll() throws IOException
// {
// ClassGroup group1 = JarUtil.loadJar(new File("d:/rs/07/adamin1.jar"));
// ClassGroup group2 = JarUtil.loadJar(new File("d:/rs/07/adamin2.jar"));
//
// for (String[] s : methods)
// {
// String[] one = s[0].split("\\."), two = s[1].split("\\.");
//
// Method m1 = group1.findClass(one[0]).findMethod(one[1]);
// Method m2 = group2.findClass(two[0]).findMethod(two[1]);
//
// ParallelExecutorMapping mappings = MappingExecutorUtil.map(m1, m2);
// }
// }
@Test
//@Test
public void test() throws IOException
{
ClassGroup group1 = JarUtil.loadJar(new File("d:/rs/07/adamin1.jar"));
@@ -91,6 +91,19 @@ public class MapStaticTest
}
}
@Test
public void testDeep() throws IOException
{
ClassGroup group1 = JarUtil.loadJar(new File("d:/rs/07/adamin1.jar"));
ClassGroup group2 = JarUtil.loadJar(new File("d:/rs/07/adamin2.jar"));
Method m1 = group1.findClass("class72").findMethod("run");
Method m2 = group2.findClass("class72").findMethod("run");
HashMap<Object, Object> all = new HashMap();
map(all, new HashSet(), m1, m2);
}
//@Test
public void testAllMap() throws Exception
{
@@ -160,6 +173,11 @@ public class MapStaticTest
return;
all.put(m1, m2);
assert (m1.getCode() == null) == (m2.getCode() == null);
if (m1.getCode() == null)
return;
ParallelExecutorMapping mappings;
try
{
@@ -174,7 +192,12 @@ public class MapStaticTest
for (Entry<Object, Object> e : mappings.getMap().entrySet())
{
if (e.getKey() instanceof Method)
map(all, invalid, (Method) e.getKey(), (Method) e.getValue());
{
Method n1 = (Method) e.getKey(),
n2 = (Method) e.getValue();
map(all, invalid, n1, n2);
}
else
all.put(e.getKey(), e.getValue());
//assert all