Created
August 10, 2012 15:01
-
-
Save vrobel/3314807 to your computer and use it in GitHub Desktop.
Test case for removing and adding system with same priority causess infinite loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public function removeSystemAndAddItAgainDontCauseInvalidLinkedList():void { | |
var systemB:System = new System(); | |
var systemC:System = new System(); | |
game.addSystem( systemB, 0 ); | |
game.addSystem( systemC, 0 ); | |
game.removeSystem(systemB); | |
game.addSystem(systemB, 0); | |
// game.update( 0.1 ); | |
assertThat( systemC.previous, nullValue() ); | |
assertThat( systemB.next, nullValue() ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment