eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[tests] Use customized EmfFormatter #2262

Open eclipse-ocl-bot opened 2 weeks ago

eclipse-ocl-bot commented 2 weeks ago

| --- | --- | | Bugzilla Link | 580399 | | Status | NEW | | Importance | P3 normal | | Reported | Jul 19, 2022 05:05 EDT | | Modified | Jul 30, 2022 02:49 EDT | | See also | 376050, 579051, 580363 | | Reporter | Ed Willink |

Description

Bug 376050 introduced the usage of EmfFormatter for test model comparison and it has been the mainstay of many tests ever since. But its implementation is all static so it cannot be 'improved' by derivation. It is therefore necessary to use normalizers prior to serialization to hide:

The string representation is not particularly readable.

Now as a consequence of Bug 580363 avoiding corruption by relocating orphan references and Bug 579051 re-instating multiple orphanages we have a problem when comparing orphan references.

Yet another normalizer could perhaps contrive to use long-LUSSID rather than short-XMI-LUSSID as OrphanResource ids.

Or a tweaked-clone/rewrite of EmfFormatter could better fit the use case.

eclipse-ocl-bot commented 2 weeks ago

By Ed Willink on Jul 30, 2022 02:49

(In reply to Ed Willink from comment #0)

It is therefore necessary to use normalizers prior to serialization to hide:

and TestsXMLUtil.resetTransients

we have a problem when comparing orphan references.

This goes away once the suppression of xmi:ids for the OrphanResource is removed.