aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/poifs/macros
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2016-09-21 05:03:57 +0000
committerJaven O'Neal <onealj@apache.org>2016-09-21 05:03:57 +0000
commit4b5f88d7912df6035ad239a080d5440827f25b40 (patch)
tree9855ce53bdf780eee23fb1bf4bf86b06ea1b22ac /src/testcases/org/apache/poi/poifs/macros
parentd7a55deec0b45b17faf000b88d068c0580c6d20e (diff)
downloadpoi-4b5f88d7912df6035ad239a080d5440827f25b40.tar.gz
poi-4b5f88d7912df6035ad239a080d5440827f25b40.zip
add fixturing for notifying us when a previously failing unit test passes (better than @Ignore)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1761672 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/poifs/macros')
-rw-r--r--src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java b/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java
index 63fff7f967..614b4effaf 100644
--- a/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java
+++ b/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java
@@ -18,16 +18,15 @@
package org.apache.poi.poifs.macros;
import static org.apache.poi.POITestCase.assertContains;
+import static org.apache.poi.POITestCase.skipTest;
+import static org.apache.poi.POITestCase.testPassesNow;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.StringWriter;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -263,17 +262,13 @@ public class TestVBAMacroReader {
reader.close();
}
- private static void skipTest(Throwable e) {
- assumeTrue("This test currently fails with " + e, false);
- }
-
// This test is written as expected-to-fail and should be rewritten
// as expected-to-pass when the bug is fixed.
@Test
public void bug59858() throws IOException {
try {
fromFile(POIDataSamples.getSpreadSheetInstance(), "59858.xls");
- fail("This test passes now. Please update the unit test and bug 59858.");
+ testPassesNow(59858);
} catch (IOException e) {
if (e.getMessage().matches("Module offset for '.+' was never read.")) {
//e.printStackTrace();
@@ -292,7 +287,7 @@ public class TestVBAMacroReader {
public void bug60158() throws IOException {
try {
fromFile(POIDataSamples.getDocumentInstance(), "60158.docm");
- fail("This test passes now. Please update the unit test and bug 60158.");
+ testPassesNow(60158);
} catch (ArrayIndexOutOfBoundsException e) {
skipTest(e);
}