Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2010-03-01 22:30:19 +0000
committerChris Goldthorpe2010-03-01 22:30:19 +0000
commit77b551b275bfd7b6cfd71c619c3988d14dcec7a5 (patch)
treeb61a436537c197d3214e393e253846ac44b7e605 /org.eclipse.ua.tests/base/org/eclipse/ua/tests/util
parent94be1b5d90055af0cbea6b5b4a478769f1299e43 (diff)
downloadeclipse.platform.ua-77b551b275bfd7b6cfd71c619c3988d14dcec7a5.tar.gz
eclipse.platform.ua-77b551b275bfd7b6cfd71c619c3988d14dcec7a5.tar.xz
eclipse.platform.ua-77b551b275bfd7b6cfd71c619c3988d14dcec7a5.zip
Bug 290831 - [Help] Eclipse Help shortcuts the <a> in XHTML content.
Diffstat (limited to 'org.eclipse.ua.tests/base/org/eclipse/ua/tests/util')
-rw-r--r--org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/XMLUtil.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/XMLUtil.java b/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/XMLUtil.java
index 04f4b6d4d..b81b1d203 100644
--- a/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/XMLUtil.java
+++ b/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/XMLUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -41,13 +41,22 @@ public class XMLUtil extends Assert {
InputStream in2 = new ByteArrayInputStream(s2.getBytes("UTF-8"));
assertXMLEquals(msg, in1, in2);
}
-
+
public static void assertXMLEquals(String msg, InputStream in1, InputStream in2) throws Exception {
String s1 = process(in1);
String s2 = process(in2);
assertEquals(msg, s1, s2);
}
+ public static void assertParseableXML(String s) {
+ try {
+ InputStream in1 = new ByteArrayInputStream(s.getBytes("UTF-8"));
+ process(in1);
+ } catch (Exception e) {
+ fail("Unable to parse source: " + s);
+ }
+ }
+
private static String process(InputStream in) throws Exception {
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();

Back to the top