Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 100781 Details for
Bug 232669
Regression - bug in OCLAbstractAnalyzer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
contributed Test Cases
patch.txt (text/plain), 3.31 KB, created by
Adolfo Sanchez-Barbudo Herrera
on 2008-05-17 13:55:06 EDT
(
hide
)
Description:
contributed Test Cases
Filename:
MIME Type:
Creator:
Adolfo Sanchez-Barbudo Herrera
Created:
2008-05-17 13:55:06 EDT
Size:
3.31 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ocl.uml.tests >Index: src/org/eclipse/ocl/uml/tests/IteratorsTest.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/tests/org.eclipse.ocl.uml.tests/src/org/eclipse/ocl/uml/tests/IteratorsTest.java,v >retrieving revision 1.4 >diff -u -r1.4 IteratorsTest.java >--- src/org/eclipse/ocl/uml/tests/IteratorsTest.java 23 Apr 2007 21:16:24 -0000 1.4 >+++ src/org/eclipse/ocl/uml/tests/IteratorsTest.java 17 May 2008 17:52:29 -0000 >@@ -883,6 +883,23 @@ > } > } > >+ public void test_collect_ShortestCollect_Error() { >+ helper.setContext(getMetaclass("Package")); //$NON-NLS-1$ >+ try { >+ // should fail since nonIntegerProperty is not a property of Integer >+ evaluate(helper, EcorePackage.eINSTANCE, >+ "let b:Integer = null in Bag{1, 2, 3}.nonIntegerProperty"); //$NON-NLS-1$ >+ fail("Validation should have failed"); //$NON-NLS-1$ >+ } catch (ParserException exc) { >+ String excMessage = exc.getLocalizedMessage(); >+ if ( excMessage != null >+ && excMessage.equals("Unrecognized variable: (nonIntegerProperty)")) //$NON-NLS-1$ >+ System.out.println("Got expected error: " + exc.getLocalizedMessage()); //$NON-NLS-1$ >+ else >+ fail("Unexpected exception: " + exc.getLocalizedMessage()); //$NON-NLS-1$ >+ } >+ } >+ > // > // Framework methods > // >#P org.eclipse.ocl.ecore.tests >Index: src/org/eclipse/ocl/ecore/tests/IteratorsTest.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/tests/org.eclipse.ocl.ecore.tests/src/org/eclipse/ocl/ecore/tests/IteratorsTest.java,v >retrieving revision 1.5 >diff -u -r1.5 IteratorsTest.java >--- src/org/eclipse/ocl/ecore/tests/IteratorsTest.java 26 Mar 2008 21:17:23 -0000 1.5 >+++ src/org/eclipse/ocl/ecore/tests/IteratorsTest.java 17 May 2008 17:52:35 -0000 >@@ -772,8 +772,8 @@ > } catch (Exception exc) { > fail("Failed to parse or evaluate: " + exc.getLocalizedMessage()); //$NON-NLS-1$ > } >- } >- >+ } >+ > /** > * Tests that when the body of an iterator results in OclInvalid, the entire > * iterator expression's value is OclInvalid. >@@ -1070,6 +1070,23 @@ > fail("Failed to parse or evaluate: " + e.getLocalizedMessage()); //$NON-NLS-1$ > } > } >+ >+ public void test_collect_ShortestCollect_Error() { >+ helper.setContext(EcorePackage.Literals.EPACKAGE); >+ try { >+ // should fail since nonIntegerProperty is not a property of Integer >+ evaluate(helper, EcorePackage.eINSTANCE, >+ "let b:Integer = null in Bag{1, 2, 3}.nonIntegerProperty"); //$NON-NLS-1$ >+ fail("Validation should have failed"); //$NON-NLS-1$ >+ } catch (ParserException exc) { >+ String excMessage = exc.getLocalizedMessage(); >+ if ( excMessage != null >+ && excMessage.equals("Unrecognized variable: (nonIntegerProperty)")) //$NON-NLS-1$ >+ System.out.println("Got expected error: " + exc.getLocalizedMessage()); //$NON-NLS-1$ >+ else >+ fail("Unexpected exception: " + exc.getLocalizedMessage()); //$NON-NLS-1$ >+ } >+ } > > // > // Framework methods
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 232669
:
100781
|
100784