Ghidra is a software reverse engineering (SRE) framework
GT-3205 - Tests - updated test framework to reflect how 'testFailed()' is now called
dragonmacher0fc85177d8f5
diff --git a/Ghidra/Framework/Docking/src/test.slow/java/docking/widgets/tree/GTreeTest.java b/Ghidra/Framework/Docking/src/test.slow/java/docking/widgets/tree/GTreeTest.javaindex 895effedce..e897506fa4 100644--- a/Ghidra/Framework/Docking/src/test.slow/java/docking/widgets/tree/GTreeTest.java+++ b/Ghidra/Framework/Docking/src/test.slow/java/docking/widgets/tree/GTreeTest.java@@ -773,27 +773,6 @@ public class GTreeTest extends AbstractDockingTest {return path;}- @Override- protected void testFailed(Throwable e) {- StringBuilder buffy = new StringBuilder();- printTree(gTree.getRootNode(), 0, buffy);- System.err.println("GTree state: ");- System.err.println(buffy.toString());- }-- private void printTree(GTreeNode node, int indentLevel, StringBuilder buffy) {- buffy.append('\n');- for (int i = 0; i < indentLevel; i++) {- buffy.append('\t');- }- buffy.append("node: " + node.getName());- int nextIndentLevel = indentLevel + 1;- List<GTreeNode> children = node.getChildren();- for (GTreeNode child : children) {- printTree(child, nextIndentLevel, buffy);- }- }-private void assertProgressPanel(boolean isShowing) {JComponent panel = (JComponent) getInstanceField("progressPanel", gTree);if (!isShowing) {diff --git a/Ghidra/Framework/Generic/src/main/java/generic/test/AbstractGenericTest.java b/Ghidra/Framework/Generic/src/main/java/generic/test/AbstractGenericTest.javaindex 041d5efd0f..0bf9268cae 100644--- a/Ghidra/Framework/Generic/src/main/java/generic/test/AbstractGenericTest.java+++ b/Ghidra/Framework/Generic/src/main/java/generic/test/AbstractGenericTest.java@@ -216,7 +216,8 @@ public abstract class AbstractGenericTest extends AbstractGTest {/*** A callback for subclasses when a test has failed. This will be called- * before <code>tearDown()</code>+ * <b>after</b> <code>tearDown()</code>. This means that any diagnostics will have to+ * take into account items that have already been disposed.** @param e the exception that happened when the test failed*/@@ -292,7 +293,7 @@ public abstract class AbstractGenericTest extends AbstractGTest {* @param cls class where resource exists* @param name resource filename* @return list of lines contained in file- * @throws IOException+ * @throws IOException if an exception occurs reading the given resource*/public static List<String> loadTextResource(Class<?> cls, String name) throws IOException {@@ -348,7 +349,7 @@ public abstract class AbstractGenericTest extends AbstractGTest {* Returns a file that points to the location on disk of the given relative* path name. The path is relative to the test resources directory.*- * @param relativePath+ * @param relativePath the path of the file* @return a file that points to the location on disk of the relative path.* @throws FileNotFoundException If the directory does not exist* @throws IOException if the given path does not represent a directory@@ -486,9 +487,9 @@ public abstract class AbstractGenericTest extends AbstractGTest {* has the type classType. This method is only really useful if it is known* that only a single field of classType exists within the ownerInstance.*- * @param <T>- * @param classType- * @param ownerInstance+ * @param <T> the type+ * @param classType the class type of the desired field+ * @param ownerInstance the object instance that owns the field* @return field object of type classType or null*/public static <T> T getInstanceFieldByClassType(Class<T> classType, Object ownerInstance) {