package tests /** * A shallow history must also for child states that are only indirectly entered through one of the childs. */ testclass ShallowHistoryWithDeepEntry for statechart ShallowHistoryWithDeepEntry{ operation noDeepEntryWithinHistory(){ enter assert active(ShallowHistoryWithDeepEntry.main_region.Y) raise toZ cycle assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.A) raise toY cycle assert active(ShallowHistoryWithDeepEntry.main_region.Y) raise toZ cycle assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.A) } operation deepEntryWithinHistory(){ enter assert active(ShallowHistoryWithDeepEntry.main_region.Y) raise toZ cycle assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.A) raise toC cycle assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B._region0.C) assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B) raise toY cycle assert active(ShallowHistoryWithDeepEntry.main_region.Y) raise toZ cycle assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B._region0.C) assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B) } operation directDeepEntryIntoHistory(){ enter assert active(ShallowHistoryWithDeepEntry.main_region.Y) raise toC cycle assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B._region0.C) assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B) raise toY cycle assert active(ShallowHistoryWithDeepEntry.main_region.Y) raise toZ cycle assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B._region0.C) assert active(ShallowHistoryWithDeepEntry.main_region.Z._region0.B) } }