| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2e7d688 commit 1b393c9
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,8 +50,10 @@ | |||
| 50 | 50 | ||
| 51 | 51 | package edu.rice.cs.drjava.model.coverage; | |
| 52 | 52 | ||
| 53 | - import java.util.Map; | ||
| 54 | - import java.util.HashMap; | ||
| 53 | + | ||
| 54 | + import java.io.File; | ||
| 55 | + import java.io.IOException; | ||
| 56 | + | ||
| 55 | 57 | import java.lang.ClassLoader; | |
| 56 | 58 | ||
| 57 | 59 | import edu.rice.cs.plt.io.IOUtil; | |
@@ -60,10 +62,6 @@ | |||
| 60 | 62 | import edu.rice.cs.util.IterableOps; | |
| 61 | 63 | import edu.rice.cs.util.UnexpectedException; | |
| 62 | 64 | ||
| 63 | - import java.io.File; | ||
| 64 | - import java.io.IOException; | ||
| 65 | - import java.util.Arrays; | ||
| 66 | - | ||
| 67 | 65 | import org.jacoco.core.instr.Instrumenter; | |
| 68 | 66 | ||
| 69 | 67 | /** A class loader that instruments classes for code coverage.*/ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,39 +36,57 @@ | |||
| 36 | 36 | ||
| 37 | 37 | package edu.rice.cs.drjava.model.junit; | |
| 38 | 38 | ||
| 39 | - import edu.rice.cs.drjava.model.coverage.JacocoClassLoader; | ||
| 40 | - import edu.rice.cs.plt.reflect.EmptyClassLoader; | ||
| 41 | - import junit.framework.*; | ||
| 42 | - | ||
| 43 | 39 | import java.io.File; | |
| 44 | 40 | import java.io.InputStream; | |
| 45 | 41 | ||
| 46 | 42 | import java.net.MalformedURLException; | |
| 47 | 43 | import java.net.URL; | |
| 48 | 44 | import java.net.URLClassLoader; | |
| 49 | - import java.util.*; | ||
| 45 | + | ||
| 46 | + import java.lang.reflect.Method; | ||
| 47 | + import java.lang.reflect.Modifier; | ||
| 48 | + | ||
| 49 | + import java.util.ArrayList; | ||
| 50 | + import java.util.LinkedList; | ||
| 51 | + import java.util.List; | ||
| 52 | + import java.util.Map; | ||
| 53 | + import java.util.Enumeration; | ||
| 54 | + import java.util.Arrays; | ||
| 50 | 55 | ||
| 51 | 56 | import edu.rice.cs.drjava.model.coverage.CoverageMetadata; | |
| 52 | 57 | import edu.rice.cs.drjava.model.coverage.ReportGenerator; | |
| 53 | 58 | ||
| 54 | 59 | import edu.rice.cs.drjava.model.repl.newjvm.ClassPathManager; | |
| 60 | + | ||
| 55 | 61 | import edu.rice.cs.util.Log; | |
| 56 | 62 | import edu.rice.cs.util.UnexpectedException; | |
| 57 | 63 | import edu.rice.cs.util.classloader.ClassFileError; | |
| 64 | + | ||
| 58 | 65 | import edu.rice.cs.plt.io.IOUtil; | |
| 59 | 66 | import edu.rice.cs.plt.tuple.Pair; | |
| 60 | 67 | import edu.rice.cs.plt.iter.IterUtil; | |
| 61 | 68 | ||
| 62 | - import java.lang.reflect.Method; | ||
| 63 | - import java.lang.reflect.Modifier; | ||
| 69 | + import edu.rice.cs.drjava.model.coverage.JacocoClassLoader; | ||
| 70 | + import edu.rice.cs.plt.reflect.EmptyClassLoader; | ||
| 64 | 71 | ||
| 65 | 72 | import static edu.rice.cs.plt.debug.DebugUtil.error; | |
| 66 | 73 | ||
| 74 | + import junit.framework.JUnit4TestAdapter; | ||
| 75 | + | ||
| 76 | + import junit.framework.AssertionFailedError; | ||
| 77 | + | ||
| 78 | + import junit.framework.Test; | ||
| 79 | + import junit.framework.TestResult; | ||
| 80 | + import junit.framework.TestSuite; | ||
| 81 | + import junit.framework.TestFailure; | ||
| 82 | + import junit.framework.JUnit4TestCaseFacade; | ||
| 83 | + | ||
| 67 | 84 | import org.jacoco.core.analysis.Analyzer; | |
| 68 | 85 | import org.jacoco.core.analysis.CoverageBuilder; | |
| 69 | 86 | import org.jacoco.core.analysis.IBundleCoverage; | |
| 70 | 87 | import org.jacoco.core.data.ExecutionDataStore; | |
| 71 | 88 | import org.jacoco.core.data.SessionInfoStore; | |
| 89 | + | ||
| 72 | 90 | import org.jacoco.core.instr.Instrumenter; | |
| 73 | 91 | import org.jacoco.core.runtime.IRuntime; | |
| 74 | 92 | import org.jacoco.core.runtime.LoggerRuntime; | |
@@ -107,6 +125,8 @@ public class JUnitTestManager { | |||
| 107 | 125 | private List<String> _nonTestClassNames = null; | |
| 108 | 126 | private JUnitResultTuple _finalResult = new JUnitResultTuple(false, null); | |
| 109 | 127 | ||
| 128 | + private ArrayList<String> nonTestClassNames = new ArrayList(); | ||
| 129 | + | ||
| 110 | 130 | /** Standard constructor | |
| 111 | 131 | * @param jmc a JUnitModelCallback | |
| 112 | 132 | * @param loaderFactory factory to create class loaders | |
@@ -261,7 +281,6 @@ public boolean runTestSuite() { | |||
| 261 | 281 | _log.log("Testing doCoverage"); | |
| 262 | 282 | ||
| 263 | 283 | if (_runtime != null) { /* doCoverage was true */ | |
| 264 | - | ||
| 265 | 284 | _log.log("Analyzing coverage data for " + _nonTestClassNames); | |
| 266 | 285 | ||
| 267 | 286 | /* Collect session info (including which code was executed) */ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments