<commit_before>/*
 * Copyright (C) 2007  <NAME>, <NAME>
 *
 * IFS Institute for Software, HSR Rapperswil, Switzerland
 *
 */

package ch.hsr.ifs.pystructure.tests.typeinference;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import junit.framework.TestCase;


import ch.hsr.ifs.pystructure.playground.Structure101Logger;
import ch.hsr.ifs.pystructure.typeinference.inferencer.ITypeInferencer;
import ch.hsr.ifs.pystructure.typeinference.visitors.Workspace;
import ch.hsr.ifs.pystructure.utils.FileUtils;
import ch.hsr.ifs.pystructure.utils.TestUtils;
import ch.hsr.ifs.pystructure.utils.TestUtils.Marker;

public class TypeInferenceTest extends TestCase {

	private File file;
	private String sourceCode;
	private Workspace workspace;
	private ITypeInferencer inferencer;
	private Structure101Logger logger;

	public TypeInferenceTest(String name, File file, Workspace workspace,
			ITypeInferencer inferencer, Structure101Logger logger)
			throws IOException {
		super(name);
		this.file = file;
		this.sourceCode = FileUtils.read(file);
		this.workspace = workspace;
		this.inferencer = inferencer;
		this.logger = logger;
	}
	
	protected void runTest() throws Throwable {
		List<ExpressionTypeAssertion> assertions = extractAssertions();

		if (assertions.size() == 0) {
			return;
		}
<commit_msg>Remove useless check.<commit_after>/*
 * Copyright (C) 2007  <NAME>, <NAME>
 *
 * IFS Institute for Software, HSR Rapperswil, Switzerland
 *
 */

package ch.hsr.ifs.pystructure.tests.typeinference;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import junit.framework.TestCase;


import ch.hsr.ifs.pystructure.playground.Structure101Logger;
import ch.hsr.ifs.pystructure.typeinference.inferencer.ITypeInferencer;
import ch.hsr.ifs.pystructure.typeinference.visitors.Workspace;
import ch.hsr.ifs.pystructure.utils.FileUtils;
import ch.hsr.ifs.pystructure.utils.TestUtils;
import ch.hsr.ifs.pystructure.utils.TestUtils.Marker;

public class TypeInferenceTest extends TestCase {

	private File file;
	private String sourceCode;
	private Workspace workspace;
	private ITypeInferencer inferencer;
	private Structure101Logger logger;

	public TypeInferenceTest(String name, File file, Workspace workspace,
			ITypeInferencer inferencer, Structure101Logger logger)
			throws IOException {
		super(name);
		this.file = file;
		this.sourceCode = FileUtils.read(file);
		this.workspace = workspace;
		this.inferencer = inferencer;
		this.logger = logger;
	}
	
	protected void runTest() throws Throwable {
		List<ExpressionTypeAssertion> assertions = extractAssertions();

{'fraction_non_alphanumeric': 0.09693113772455089, 'fraction_numerical': 0.010104790419161677, 'mean_word_length': 5.2453271028037385, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '830955', 'n_tokens_mistral': 919, 'n_tokens_neox': 834, 'n_words': 184}