Author: scabanovich
Date: 2012-08-29 16:31:23 -0400 (Wed, 29 Aug 2012)
New Revision: 43303
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalBean.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.changed
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.original
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/NewBean.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/IncrementalValidationTest.java
Log:
JBIDE-12503
https://issues.jboss.org/browse/JBIDE-12503
Test is added.
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/.settings/org.eclipse.jdt.core.prefs 2012-08-29
20:31:23 UTC (rev 43303)
@@ -0,0 +1,8 @@
+#Fri Nov 04 10:56:09 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalBean.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalBean.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalBean.java 2012-08-29
20:31:23 UTC (rev 43303)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.typed;
+
+public interface LocalBean {
+
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.changed
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.changed
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.changed 2012-08-29
20:31:23 UTC (rev 43303)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.typed;
+
+public interface LocalExtendedBean extends LocalBean {
+
+}
\ No newline at end of file
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.java 2012-08-29
20:31:23 UTC (rev 43303)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.typed;
+
+public interface LocalExtendedBean {
+
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.original
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.original
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/LocalExtendedBean.original 2012-08-29
20:31:23 UTC (rev 43303)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.typed;
+
+public interface LocalExtendedBean {
+
+}
\ No newline at end of file
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/NewBean.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/NewBean.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/NewBean.java 2012-08-29
20:31:23 UTC (rev 43303)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.jbt.typed;
+
+import javax.enterprise.inject.Typed;
+
+(a)Typed(LocalBean.class)
+public class NewBean implements LocalExtendedBean {
+
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/typed/NewBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/IncrementalValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/IncrementalValidationTest.java 2012-08-29
19:59:00 UTC (rev 43302)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/IncrementalValidationTest.java 2012-08-29
20:31:23 UTC (rev 43303)
@@ -115,4 +115,24 @@
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
}
}
+
+ public void testRestrictedType() throws Exception {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ try {
+ IFile bean =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/typed/NewBean.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(bean,
CDIValidationMessages.ILLEGAL_TYPE_IN_TYPED_DECLARATION, 5);
+ IFile interfaceFile =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/typed/LocalExtendedBean.java");
+ IFile modifiedFile =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/typed/LocalExtendedBean.changed");
+ interfaceFile.setContents(modifiedFile.getContents(), IFile.FORCE, new
NullProgressMonitor());
+ TestUtil.validate(bean);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(bean,
CDIValidationMessages.ILLEGAL_TYPE_IN_TYPED_DECLARATION, 5);
+
+ IFile originalFile =
tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/typed/LocalExtendedBean.original");
+ interfaceFile.setContents(originalFile.getContents(), IFile.FORCE, new
NullProgressMonitor());
+ TestUtil.validate(bean);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(bean,
CDIValidationMessages.ILLEGAL_TYPE_IN_TYPED_DECLARATION, 5);
+ } finally {
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ }
+ }
}
\ No newline at end of file