<commit_before>package flixel.math;

import massive.munit.Assert;
import flixel.math.FlxRandom;

class FlxRandomTest extends FlxTest
{
	@Test // #1172
	function testIntExcludes():Void
	{
		for (i in 0...20)
		{
			Assert.areEqual(0, FlxG.random.int(0, 1, [1]));
		}
	}
}<commit_msg>Add a unit test for #1536<commit_after>package flixel.math;

import flixel.util.FlxColor;
import massive.munit.Assert;
import flixel.math.FlxRandom;

class FlxRandomTest extends FlxTest
{
	var random:FlxRandom;
	
	@Before
	function before()
	{
		random = new FlxRandom();
	}
	
	@Test // #1172
	function testIntExcludes()
	{
		for (i in 0...20)
		{
			Assert.areEqual(0, random.int(0, 1, [1]));
		}
	}
	
	@Test // #1536
	function testColorNullException()
	{
		random.color(null, null);
		random.color(FlxColor.GRAY, null);
		random.color(null, FlxColor.GRAY);
		
		random.color(null, null, null);
		random.color(FlxColor.GRAY, null, null);
		random.color(null, FlxColor.GRAY, null);
		random.color(FlxColor.RED, FlxColor.GRAY, null);
	}
}
{'fraction_non_alphanumeric': 0.14720314033366044, 'fraction_numerical': 0.029440628066732092, 'mean_word_length': 3.9514563106796117, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5704139', 'n_tokens_mistral': 445, 'n_tokens_neox': 401, 'n_words': 81}