<commit_before>package tests
{
	import com.nextgenactionscript.asconfigc.CompilerOptionsParser;
	import com.nextgenactionscript.asconfigc.CompilerOptions;
	import nextgenas.test.assert.Assert;

	public class CompilerOptionsTests
	{
		[Test]
		public function testAccessible():void
		{
			var args:Object = {};
			args[CompilerOptions.ACCESSIBLE] = true;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 1,
				"Incorrect argument count for " + CompilerOptions.ACCESSIBLE);
			Assert.strictEqual(result[0], "--" + CompilerOptions.ACCESSIBLE + "=true",
				"Incorrect argument value for " + CompilerOptions.ACCESSIBLE);
		}

		[Test]
		public function testDebug():void
		{
			var args:Object = {};
			args[CompilerOptions.DEBUG] = true;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 1,
				"Incorrect argument count for " + CompilerOptions.DEBUG);
			Assert.strictEqual(result[0], "--" + CompilerOptions.DEBUG + "=true",
				"Incorrect argument value for " + CompilerOptions.DEBUG);
		}

		[Test]
		public function testDebugPassword():void
		{
			var value:String = "<PASSWORD>";
			var args:Object = {};
			args[CompilerOptions.DEBUG_PASSWORD] = value;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 1,
				"Incorrect argument count for " + CompilerOptions.DEBUG_PASSWORD);
			Assert.strictEqual(result[0], "--" + CompilerOptions.DEBUG_PASSWORD + "=" + value,
				"Incorrect argument value for " + CompilerOptions.DEBUG_PASSWORD);
		}

		[Test]
		public function testDefaultFrameRate():void
		{
			var value:int = 52;
			var args:Object = {};
			args[CompilerOptions.DEFAULT_FRAME_RATE] = value;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 1,
				"Incorrect argument count for " + CompilerOptions.DEFAULT_FRAME_RATE);
			Assert.strictEqual(result[0], "--" + CompilerOptions.DEFAULT_FRAME_RATE + "=" + value,
				"Incorrect argument value for " + CompilerOptions.DEFAULT_FRAME_RATE);
		}

		[Test]
		public function testDefaultSize():void
		{
			var value:Object =
			{
				width: 828,
				height: 367
			}
			var args:Object = {};
			args[CompilerOptions.DEFAULT_SIZE] = value;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 3,
				"Incorrect argument count for " + CompilerOptions.DEFAULT_SIZE);
			Assert.strictEqual(result[0], "--" + CompilerOptions.DEFAULT_SIZE,
				"Incorrect argument 0 value for " + CompilerOptions.DEFAULT_SIZE);
			Assert.strictEqual(result[1], value.width.toString(),
				"Incorrect argument 1 value for " + CompilerOptions.DEFAULT_SIZE);
			Assert.strictEqual(result[2], value.height.toString(),
				"Incorrect argument 2 value for " + CompilerOptions.DEFAULT_SIZE);
		}

		[Test]
		public function testDefine():void
		{
			var value:Array =
			[
				{
					name: "CONFIG::bool",
					value: true
				},
				{
					name: "CONFIG::str",
					value: "test"
				},
				{
					name: "CONFIG::num",
					value: 12.3
				}
			];
			var args:Object = {};
			args[CompilerOptions.DEFINE] = value;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 3,
				"Incorrect argument count for " + CompilerOptions.DEFINE);
			Assert.strictEqual(result[0],
				"--" + CompilerOptions.DEFINE + "+=" + value[0].name + "," + value[0].value,
				"Incorrect argument 0 value for " + CompilerOptions.DEFINE);
			Assert.strictEqual(result[1],
				"--" + CompilerOptions.DEFINE + "+=" + value[1].name + ",\"" + value[1].value + "\"",
				"Incorrect argument 1 value for " + CompilerOptions.DEFINE);
			Assert.strictEqual(result[2],
				"--" + CompilerOptions.DEFINE + "+=" + value[2].name + "," + value[2].value,
				"Incorrect argument 2 value for " + CompilerOptions.DEFINE);
		}

		[Test]
		public function testDumpConfig():void<commit_msg>better tests for define compiler option<commit_after>package tests
{
	import com.nextgenactionscript.asconfigc.CompilerOptionsParser;
	import com.nextgenactionscript.asconfigc.CompilerOptions;
	import nextgenas.test.assert.Assert;

	public class CompilerOptionsTests
	{
		[Test]
		public function testAccessible():void
		{
			var args:Object = {};
			args[CompilerOptions.ACCESSIBLE] = true;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 1,
				"Incorrect argument count for " + CompilerOptions.ACCESSIBLE);
			Assert.strictEqual(result[0], "--" + CompilerOptions.ACCESSIBLE + "=true",
				"Incorrect argument value for " + CompilerOptions.ACCESSIBLE);
		}

		[Test]
		public function testDebug():void
		{
			var args:Object = {};
			args[CompilerOptions.DEBUG] = true;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 1,
				"Incorrect argument count for " + CompilerOptions.DEBUG);
			Assert.strictEqual(result[0], "--" + CompilerOptions.DEBUG + "=true",
				"Incorrect argument value for " + CompilerOptions.DEBUG);
		}

		[Test]
		public function testDebugPassword():void
		{
			var value:String = "12345";
			var args:Object = {};
			args[CompilerOptions.DEBUG_PASSWORD] = value;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 1,
				"Incorrect argument count for " + CompilerOptions.DEBUG_PASSWORD);
			Assert.strictEqual(result[0], "--" + CompilerOptions.DEBUG_PASSWORD + "=" + value,
				"Incorrect argument value for " + CompilerOptions.DEBUG_PASSWORD);
		}

		[Test]
		public function testDefaultFrameRate():void
		{
			var value:int = 52;
			var args:Object = {};
			args[CompilerOptions.DEFAULT_FRAME_RATE] = value;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 1,
				"Incorrect argument count for " + CompilerOptions.DEFAULT_FRAME_RATE);
			Assert.strictEqual(result[0], "--" + CompilerOptions.DEFAULT_FRAME_RATE + "=" + value,
				"Incorrect argument value for " + CompilerOptions.DEFAULT_FRAME_RATE);
		}

		[Test]
		public function testDefaultSize():void
		{
			var value:Object =
			{
				width: 828,
				height: 367
			}
			var args:Object = {};
			args[CompilerOptions.DEFAULT_SIZE] = value;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 3,
				"Incorrect argument count for " + CompilerOptions.DEFAULT_SIZE);
			Assert.strictEqual(result[0], "--" + CompilerOptions.DEFAULT_SIZE,
				"Incorrect argument 0 value for " + CompilerOptions.DEFAULT_SIZE);
			Assert.strictEqual(result[1], value.width.toString(),
				"Incorrect argument 1 value for " + CompilerOptions.DEFAULT_SIZE);
			Assert.strictEqual(result[2], value.height.toString(),
				"Incorrect argument 2 value for " + CompilerOptions.DEFAULT_SIZE);
		}

		[Test]
		public function testDefine():void
		{
			var value:Array =
			[
				{
					name: "CONFIG::bool",
					value: true
				},
				{
					name: "CONFIG::str",
					value: "'test'"
				},
				{
					name: "CONFIG::num",
					value: 12.3
				},
				{
					name: "CONFIG::expr",
					value: "2 + 4"
				}
			];
			var args:Object = {};
			args[CompilerOptions.DEFINE] = value;
			var result:Array = CompilerOptionsParser.parse(args);
			Assert.strictEqual(result.length, 4,
				"Incorrect argument count for " + CompilerOptions.DEFINE);
			Assert.strictEqual(result[0],
				"--" + CompilerOptions.DEFINE + "+=" + value[0].name + "," + value[0].value,
				"Incorrect argument 0 value for " + CompilerOptions.DEFINE);
			Assert.strictEqual(result[1],
				"--" + CompilerOptions.DEFINE + "+=" + value[1].name + ",\"" + value[1].value + "\"",
				"Incorrect argument 1 value for " + CompilerOptions.DEFINE);
			Assert.strictEqual(result[2],
				"--" + CompilerOptions.DEFINE + "+=" + value[2].name + "," + value[2].value,
				"Incorrect argument 2 value for " + CompilerOptions.DEFINE);
			Assert.strictEqual(result[3],
				"--" + CompilerOptions.DEFINE + "+=" + value[3].name + ",\"" + value[3].value + "\"",
				"Incorrect argument 3 value for " + CompilerOptions.DEFINE);
		}

		[Test]
		public function testDumpConfig():void
{'fraction_non_alphanumeric': 0.13782485527774357, 'fraction_numerical': 0.010961941125754403, 'mean_word_length': 3.9331713244228435, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1356951', 'n_tokens_mistral': 3042, 'n_tokens_neox': 2491, 'n_words': 489}