Bug 339771: Split WTP-specific schema type provider into separate plugin (plus test plugin)
Fix tests setup.
diff --git a/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/.classpath b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/.classpath
index 4ecc50e..7283e14 100644
--- a/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/.classpath
+++ b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
<accessrule kind="accessible" pattern="org/eclipse/wst/xml/xpath2/processor/**"/>
diff --git a/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/META-INF/MANIFEST.MF
index e68a1d6..2064e9b 100644
--- a/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/META-INF/MANIFEST.MF
@@ -12,7 +12,8 @@
org.junit;bundle-version="3.8.2",
org.eclipse.wst.xml.core;bundle-version="[1.1.0,2.0.0)",
org.eclipse.wst.sse.core;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)"
+ org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
+ org.w3c.xqts.testsuite
Export-Package: org.eclipse.wst.xml.xpath2.wtptypes.test
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
diff --git a/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/bugTestFiles/attrNodeTest.xml b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/bugTestFiles/attrNodeTest.xml
new file mode 100644
index 0000000..974077f
--- /dev/null
+++ b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/bugTestFiles/attrNodeTest.xml
@@ -0,0 +1,6 @@
+<Example xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="attrNodeTest.xsd">
+ <x mesg="hello" />
+ <x mesg="world" />
+ <x mesg="test" />
+ <y intAttr="42"/>
+</Example>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/bugTestFiles/attrNodeTest.xsd b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/bugTestFiles/attrNodeTest.xsd
new file mode 100644
index 0000000..e6f2358
--- /dev/null
+++ b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/bugTestFiles/attrNodeTest.xsd
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Example">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="x" type="x_Type" maxOccurs="unbounded" />
+ <xs:element name="y" type="y_Type" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="x_Type">
+ <xs:attribute name="mesg" type="mesg_Type" />
+ </xs:complexType>
+
+ <xs:complexType name="y_Type">
+ <xs:attribute name="intAttr" type="xs:integer" />
+ </xs:complexType>
+
+ <xs:simpleType name="mesg_Type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="hello" />
+ <xs:enumeration value="world" />
+ <xs:enumeration value="test" />
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
diff --git a/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/bugTestFiles/bug273719.xml b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/bugTestFiles/bug273719.xml
new file mode 100644
index 0000000..5fb2082
--- /dev/null
+++ b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/bugTestFiles/bug273719.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<x>abc xyz</x>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/src/org/eclipse/wst/xml/xpath2/wtptypes/test/TestWTPDOMXPath2.java b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/src/org/eclipse/wst/xml/xpath2/wtptypes/test/TestWTPDOMXPath2.java
index 69dc459..ef04234 100644
--- a/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/src/org/eclipse/wst/xml/xpath2/wtptypes/test/TestWTPDOMXPath2.java
+++ b/tests/org.eclipse.wst.xml.xpath2.wtptypes.tests/src/org/eclipse/wst/xml/xpath2/wtptypes/test/TestWTPDOMXPath2.java
@@ -36,7 +36,7 @@
public void testSimpleWTPDOM() throws Exception {
// Test for the fix, for xpathDefaultNamespace
bundle = Platform
- .getBundle("org.eclipse.wst.xml.xpath2.processor.tests");
+ .getBundle("org.eclipse.wst.xml.xpath2.wtptypes.tests");
URL fileURL = bundle.getEntry("/bugTestFiles/bug273719.xml");
super.domDoc = load(fileURL);
@@ -64,7 +64,7 @@
public void testWTPDOMWithTypes() throws Exception {
// Test for the fix, for xpathDefaultNamespace
bundle = Platform
- .getBundle("org.eclipse.wst.xml.xpath2.processor.tests");
+ .getBundle("org.eclipse.wst.xml.xpath2.wtptypes.tests");
URL fileURL = bundle.getEntry("/bugTestFiles/attrNodeTest.xml");
super.domDoc = load(fileURL);