It fails since
I have written tests about the id generation. And the element may have a mooseID of a
previous object.
I cannot see how this would happen.
I tried the following and it never halted:
(1 to: 10000) do: [:x |
MooseEntity new mooseModel isNil ifFalse: [self halt] ]
Doit the following:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| model |
model := MooseModel new.
MooseElement resetIDGeneration.
model add: MooseElement new.
MooseElement resetIDGeneration.
self assert: [MooseElement new mooseModel isNil]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Sorry, I should have made my previous email more explicit.
What should we
do? I can remove the tests about the ID generation, but removing tests is never good.
Unless the test does not test the right thing :).
> Would it be possible to use the privateState to store the mooseModel? Are the
hypothesis why we have changed the reference of the mooseModel still valid?
...
So, all in all, the behavior of ownerOf: is still of
interest.
My tests are a bit less expressive then since "MooseEntity new mooseModel" is
not always nil. But this is ok for now.
Alexandre
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"We cannot reach the flow of things unless we let go."
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.