Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Migration and tests (+ slight model change suggestion)

Hi Gregor,

Quoting Gregor Bonifer <gregor.bonifer@xxxxxx>:
1) a floating-point literal is fine.

For correctly implementing a test, I'll need to know whether the user can rely on a certain representation that won't change during subsequent versions (i.e. floating-point literals, integer literals, etc.) or whether this should be ensured manually. In the former case, the specific representation will be tested, whereas in the latter case, I will only test that the result can be converted to some number representation.

2) Well, PriorityUnits are existentially quantified, while SequentialUnits are universally quantified, meaning that for a PriorityUnit there must exist an applicable subUnit and for a SequentialUnit all subUnits must be applicable. [...] Think of an IndependentUnit as a randomizing proxy. [...] A proxy without a target is simply invalid. So there has to be at least one.

This sounds sensible, so why isn't this encoded in the model? If we change the model accordingly and require PriorityUnits and IndependentUnits to have at least one subunit, this will be much more obvious to the user. The current tests can then be replaced by more relevant tests.

Felix



Back to the top