<commit_before>package checkstyle.checks.type;

class EnforceVarTypeHintCheckTest extends CheckTestCase<EnforceVarTypeHintCheckTests> {
	@Test
	public function testCorrectTypeHints() {
		var check = new EnforceVarTypeHintCheck();
		assertNoMsg(check, CORRECT_TYPE_HINTS);
		assertNoMsg(check, ABSTRACT_ENUM);
		assertNoMsg(check, ABSTRACT_ENUM2);
		assertNoMsg(check, FINAL_FUNCTION);
		assertMsg(check, TYPEDEF, 'Variable "risk" has no type hint');
		assertMsg(check, FINAL_VAR, 'Variable "a" has no type hint');

		check.ignoreEnumAbstractValues = false;
		assertMsg(check, ABSTRACT_ENUM, 'Variable "STYLE" has no type hint');
		assertMsg(check, ABSTRACT_ENUM2, 'Variable "STYLE" has no type hint');
	}<commit_msg>disable final tests for Haxe 3<commit_after>package checkstyle.checks.type;

class EnforceVarTypeHintCheckTest extends CheckTestCase<EnforceVarTypeHintCheckTests> {
	@Test
	public function testCorrectTypeHints() {
		var check = new EnforceVarTypeHintCheck();
		assertNoMsg(check, CORRECT_TYPE_HINTS);
		assertNoMsg(check, ABSTRACT_ENUM);
		assertNoMsg(check, ABSTRACT_ENUM2);
		assertMsg(check, TYPEDEF, 'Variable "risk" has no type hint');
		#if haxe4
		assertNoMsg(check, FINAL_FUNCTION);
		assertMsg(check, FINAL_VAR, 'Variable "a" has no type hint');
		#end

		check.ignoreEnumAbstractValues = false;
		assertMsg(check, ABSTRACT_ENUM, 'Variable "STYLE" has no type hint');
		assertMsg(check, ABSTRACT_ENUM2, 'Variable "STYLE" has no type hint');
	}
{'fraction_non_alphanumeric': 0.1008174386920981, 'fraction_numerical': 0.004087193460490463, 'mean_word_length': 6.772486772486772, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4937586', 'n_tokens_mistral': 523, 'n_tokens_neox': 491, 'n_words': 120}