|
|
|
|
|
Re: Parsing expressions without context [message #650737 is a reply to message #650726] |
Wed, 26 January 2011 10:22 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi Robert
The new model-driven standard library support was promoted from its
branch a couple of days ago.
It has a much more library operation focussed set of tests, that now
demonstrate that numerous awkward corner cases no pass.
org.eclipse.ocl.examples.test.generic.GenericEvaluateCollect ionOperationsTest
demonstrates a null context.
Tests using assertQueryResults demonstrate the use of OCL to define both
expression under test and expected result.
e.g.
assertQueryResults(null, "Sequence{1..3,6..9}",
"Sequence{1..4,6,7..9}->excluding(4)");
context: null ,
expected result: "Sequence{1..3,6..9}"
testing: "Sequence{1..4,6,7..9}->excluding(4)"
[The aim is to have org.elipse.ocl.examples.pivot available as a full
alternative to org.elipse.ocl.ecore or org.elipse.ocl.uml for MDT/OCL
3.1.0 (Indigo), with promotion occurring to org.elipse.ocl.pivot in
MDT/OCL 4.0.0 (Indigo+1) with the Ecore/UML bindings increasingly
deprecated. The promotion is timed to align with Xtext changing to 2.0
for Indigo M5 in a week. Hopefully M5 wil support a clean installation;
until then piecing the M4 plus a bit contributions together may be hard.]
Regards
Ed Willink
On 26/01/2011 09:45, Robert wrote:
> Is there a specific JUnit that you could direct me to that does this?
> I looked at some tests, but it seems that an artificial context is
> still being setup (e.g., org.eclipse.ocl.tests.GenericKeywordsTest and
> org.eclipse.ocl.tests.GenericIteratorsTest).
>
> Would another (better) option be to use the concrete syntax instead
> (like in org.eclipse.ocl.tests.GenericParserBacktrackingTest)? My goal
> is to compare expressions using some type of structural representation.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03545 seconds