eclipse-qvtd / org.eclipse.qvtd

Eclipse Public License 2.0
0 stars 0 forks source link

[tests] Generated OCL2QVTi input/output test files are not loadable #417

Open eclipse-qvtd-bot opened 16 hours ago

eclipse-qvtd-bot commented 16 hours ago

| --- | --- | | Bugzilla Link | 552242 | | Status | NEW | | Importance | P3 normal | | Reported | Oct 19, 2019 07:31 EDT | | Modified | Oct 20, 2019 08:29 EDT | | Reporter | Ed Willink |

Description

The OCL2QVTi test files make extensive use of java: schemaLocations. These can be replaced by file navigation in inputs / referemces, but the Intrerpreted outputs are a problem becuase of Bug 532561 which prohibits a dynamically loaded model extending an apparently statically loaded class.

The use of s static Visitable class by e.g. /org.eclipse.qvtd.cs2as.compiler.tests/models/SimpleClasses/Classes.ecore establishes exactly this banned scenario.

A straightforward all dynamic fails with a bad createInstance.

The tests have fudged their way around this by statiically loading all classes, but this then causes java: schemaLcations.

Attempting to eliminate Visitable runs into a variety of problems.

It seems to be necessary to have a

gen annotation, but this seems to suppress the EObject ingeritance. Wierd, CGModel seems ok. Perhaps there is a tooling bug.

A different complexity is that the Complete OCL complements Vistable rather than Element inhibiting elimination of Visitable.

For now each OCL2QVTi test must explicitly load and unload all static classes.

eclipse-qvtd-bot commented 16 hours ago

By Ed Willink on Oct 20, 2019 08:29

(In reply to Ed Willink from comment #0)

For now each OCL2QVTi test must explicitly load and unload all static classes.

Tests now load static models more diligently, but the JUnit ordering is enforced so there may be spurious inter-test dependencies.