Re: test for default history content

Le 28 mar 2014 à 21:15, Jim Barnett <1jhbarnett@gmail.com> a écrit :

> I've added test579 to the suite.  Let me know if there are problems with it or if you think there need to be more/different tests.

At first it passed with my implementation because of an "interesting" bug where JSSC would add the <history> element to the initial configuration, and take a microstep from there to what should have been the initial configuration, using the transition in the history as a regular transition.
So the <initial> executable content was executed during onentry phase right after its parent's onentry as specified, but the <history>'s content was executed during the transition phase in the following microstep (which, given the context, resulted in queueing the events in the expected order and passing the test).

I fixed all that, but maybe we could have an extra test that ensures <history> doesn't end up in the configuration and its <transition> doesn't get enabled in the normal event loop. None of the existing tests was able to catch that bug (and it only occured when an initial element or attribute pointed to a history, not when history was targetted directly by a transition).

Also, add another test that a default <history> transition can target a substate's own <history>, and still end the microstep in a legal configuration. Maybe even by going through initial transitions.

			David

Received on Saturday, 29 March 2014 10:03:07 UTC