Skip to content

Commit

Permalink
added test for FlxRandom.getObject() StartIndex argument usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Beeblerox committed Dec 6, 2016
1 parent f7c2991 commit 189ae27
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/unit/src/flixel/math/FlxRandomTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ class FlxRandomTest extends FlxTest
}
}

@Test // #2009
function startIndexUsage()
{
var s1:String = "";
var s2:String = "";
var data = ["x", "y", "z", "e", "e"];
for (i in 0...10) {
s1 += FlxG.random.getObject(data, null, 3, 4);
s2 += "e";
}

Assert.isTrue(s1 == s2);
}

@Test // #1536
function testColorNullException()
{
Expand Down

0 comments on commit 189ae27

Please sign in to comment.