blob: 82c1dc35c3296731b5e64610ab518c1d0ad64e8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
package org.aspectj.weaver.patterns;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import junit.framework.TestCase;
import org.aspectj.weaver.World;
public abstract class PatternsTestCase extends TestCase {
protected World world;
public void setUp() throws Exception {
super.setUp();
world = getWorld();
}
protected File getTestDataJar() {
return new File("../weaver/testdata/testcode.jar");
}
public URLClassLoader getClassLoaderForFile(File f) {
try {
URLClassLoader ucl = new URLClassLoader(new URL[] { f.toURI().toURL() }, this.getClass().getClassLoader());
return ucl;
} catch (MalformedURLException mue) {
throw new RuntimeException(mue);
}
}
public abstract World getWorld();
}
|