[EVL] Possible Bug with collection comparison [message #615803] |
Tue, 29 April 2008 10:40 |
Eclipse User |
|
|
|
I may have discovered a bug which occurs when comparing collections. I
first ran the following validation file...
context SimpleClass!Entity {
constraint CheckingParentExists {
check : self.Child = true implies self.parent-> size = 1
message : 'There is no parent for ' + self.classname
}
constraint CheckChildOperations {
guard: self.Child = true
check : false
message : self.parent.operations->collect(s| s.name) + 'does not have the
correct operations' + self.operations->collect(b|b.name)
}
...which as you would expect returned: " first collection" does not have the
correct operations "second collection"
However when I add in a third constraint which should compare the two
collections (as can be seen below) there is no validation output not even to
the constraint where the check is set to false. Is this a bug or am I doing
something incorrectly? [This used to work correctly]
context SimpleClass!Entity {
constraint CheckingParentExists {
check : self.Child = true implies self.parent-> size = 1
message : 'There is no parent for ' + self.classname
}
constraint CheckChildOperations {
guard: self.Child = true
check : false
message : self.parent.operations->collect(s| s.name) + 'does not have the
correct operations' + self.operations->collect(b|b.name)
}
constraint CheckChildOperations {
guard: self.Child = true
check : self->collect(b|b.operations).includesAll( self.parent->collect(s|
s.operations ))
message : self.classname + 'does not have the correct operations'
}
}
|
|
|
Powered by
FUDForum. Page generated in 0.03533 seconds