| Summary: | EolCollection#includesAll returns true for disjoint sets | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Epsilon | Reporter: | Louis Rose <louis> | ||||||
| Component: | Core | Assignee: | Dimitris Kolovos <dkolovos> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 172643 [details]
Patch for org.eclipse.epsilon.eol.engine.test.unit
A workaround is to redefine includesAll and excludesAll in your EOL/ETL/EVL/etc file:
operation Collection includesAll(other : Collection) : Boolean {
return other.forAll(e|self.includes(e));
}
operation Collection excludesAll(other : Collection) : Boolean {
return other.forAll(e|self.excludes(e));
}
This has now been fixed in the SVN and the latest interim version. Fixed in 0.9.0. |
Created attachment 172642 [details] Patch for EolCollection The following returns true (it should return false): EolSequence abc = new EolSequence(Arrays.asList("a", "b", "c")); EolSequence d = new EolSequence(Arrays.asList("d")); abc.includesAll(d); // returns true The attached patches fix this problem (and a symmetric problem in excludesAll), and provide tests cases to prevent regressions.