1 19 20 package org.netbeans.modules.java.source.parsing; 21 import com.sun.source.tree.CompilationUnitTree; 22 import java.io.File ; 23 import java.net.URL ; 24 import junit.framework.*; 25 import org.netbeans.api.java.classpath.ClassPath; 26 import org.netbeans.modules.java.source.StopWatch; 27 import org.netbeans.modules.java.source.TestUtil; 28 import org.netbeans.spi.java.classpath.support.ClassPathSupport; 29 import org.openide.filesystems.FileUtil; 30 34 public class PerfResolveTest extends TestCase { 35 36 private File workDir; 37 private File rtJar; 38 private ClassPath bootPath; 39 private ClassPath classPath; 40 private final String SOURCE = 41 "package some;" + 42 "import javax.swing.JTable;" + 43 "import javax.swing.JLabel;" + 44 "public class MemoryFile<K,V> extends JTable {" + 45 " public java.util.Map.Entry<K,V> entry;" + 46 " public JLabel label;" + 47 " public JTable table = new JTable();" + 48 " public MemoryFile() {}" + 49 "}"; 50 51 public PerfResolveTest(String testName) { 52 super(testName); 53 } 54 55 protected void setUp() throws Exception { 56 workDir = TestUtil.createWorkFolder(); 57 TestUtil.copyFiles( workDir, TestUtil.RT_JAR, "jdk/JTable.java" ); 58 rtJar = new File ( workDir, TestUtil.RT_JAR ); 59 URL url = FileUtil.getArchiveRoot (rtJar.toURI().toURL()); 60 this.bootPath = ClassPathSupport.createClassPath (new URL [] {url}); 61 this.classPath = ClassPathSupport.createClassPath(new URL [0]); 62 } 63 64 protected void tearDown() throws Exception { 65 TestUtil.removeWorkFolder( workDir ); 66 } 67 68 73 74 80 81 82 public void resolve( String fileName, String source ) throws Exception { 83 105 } 106 107 } 108 | Popular Tags |