<commit_before>package vektah.rust;

import com.intellij.openapi.fileEditor.impl.LoadTextUtil;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.CharsetToolkit;
import com.intellij.testFramework.LightVirtualFile;
import com.intellij.testFramework.ParsingTestCase;
import org.junit.Ignore;

import java.io.File;
import java.io.IOException;

/**
 * Tests that cover parts of the rust compiler source tree. Will be expanded for complete coverage over time.
 *
 * There doesn't appear to be an easy way to do parametrized tests with junit 3 and the intellij test suites all
 * seem to extend TestCase. Woe is me.
 *
 * TODO: These test cases need to be fixed at some point - these are highlighting some syntax issues
 */
@Ignore
public class RustSourceTest extends ParsingTestCase {
	public RustSourceTest() {
		super("", "rs", new RustParserDefinition());
	}

	@Override
	protected String getTestDataPath() {
		return System.getProperty("rust.source");
	}

	public void testCompileTest() { doAllTests("compiletest"); }
	public void testLibArena() { doAllTests("libarena"); }
	public void testLibCollections() { doAllTests("libcollections"); }
	public void testLibCore() { doAllTests("libcore"); }
	public void testLibFlate() { doAllTests("libflate"); }
	public void testLibFourcc() { doAllTests("libfourcc"); }
	public void testLibGetOpts() { doAllTests("libgetopts"); }
	public void testLibGlob() { doAllTests("libglob"); }
	public void testLibGraphviz() { doAllTests("libgraphviz"); }
	public void testLibGreen() { doAllTests("libgreen"); }
	public void testLibHexFloat() { doAllTests("libhexfloat"); }
	public void testLibC() { doAllTests("liblibc"); }
	public void testLibLog() { doAllTests("liblog"); }
	public void testLibNative() { doAllTests("libnative"); }
	public void testLibNum() { doAllTests("libnum"); }
	public void testLibRand() { doAllTests("librand"); }
	public void testLibRegex() { doAllTests("libregex"); }
	public void testLibRegexMacros() { doAllTests("libregex_macros"); }
	public void testLibRustDoc() { doAllTests("librustdoc"); }
	public void testLibRustUV() { doAllTests("librustuv"); }
	public void testLibsemver() { doAllTests("libsemver"); }

	public void testLibSerialize() { doAllTests("libserialize"); }
	public void testLibSync() { doAllTests("libsync"); }
	public void testLibSyntax() { doAllTests("libsyntax"); }
	public void testLibTerm() { doAllTests("libterm"); }
	public void testLibTest() { doAllTests("libtest"); }
	public void testLibTime() { doAllTests("libtime"); }
	public void testLibUrl() { doAllTests("liburl"); }
	public void testLibUuid() { doAllTests("libuuid"); }
	public void testLibUV() { doAllTests("libuv"); }
	public void testLibWorkCache() { doAllTests("libworkcache"); }

	public void testLibRustC() {
		doAllTests("librustc", new String[] {
			"middle/typeck/infer/test.rs", // Not valid rust as of 574cbe5b07042c448c198af371803f977977b74f
		});
	}

	public void testLibStd() {
		doAllTests("libstd", new String[] {
			"vec.rs" // TODO: Unusual syntax 'let mut count_x @ mut count_y = 0;'
		});
	}
<commit_msg>remove source tests that point to code no longer in rust/src<commit_after>package vektah.rust;

import com.intellij.openapi.fileEditor.impl.LoadTextUtil;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.CharsetToolkit;
import com.intellij.testFramework.LightVirtualFile;
import com.intellij.testFramework.ParsingTestCase;
import org.junit.Ignore;

import java.io.File;
import java.io.IOException;

/**
 * Tests that cover parts of the rust compiler source tree. Will be expanded for complete coverage over time.
 *
 * There doesn't appear to be an easy way to do parametrized tests with junit 3 and the intellij test suites all
 * seem to extend TestCase. Woe is me.
 *
 * TODO: These test cases need to be fixed at some point - these are highlighting some syntax issues
 */
@Ignore
public class RustSourceTest extends ParsingTestCase {
	public RustSourceTest() {
		super("", "rs", new RustParserDefinition());
	}

	@Override
	protected String getTestDataPath() {
		return System.getProperty("rust.source");
	}

	public void testCompileTest() { doAllTests("compiletest"); }
	public void testLibArena() { doAllTests("libarena"); }
	public void testLibCollections() { doAllTests("libcollections"); }
	public void testLibCore() { doAllTests("libcore"); }
	public void testLibFlate() { doAllTests("libflate"); }
	public void testLibGetOpts() { doAllTests("libgetopts"); }
	public void testLibGraphviz() { doAllTests("libgraphviz"); }
	public void testLibC() { doAllTests("liblibc"); }
	public void testLibLog() { doAllTests("liblog"); }
	public void testLibRand() { doAllTests("librand"); }
	public void testLibRegex() { doAllTests("libregex"); }
	public void testLibRustDoc() { doAllTests("librustdoc"); }

	public void testLibSerialize() { doAllTests("libserialize"); }
	public void testLibSyntax() { doAllTests("libsyntax"); }
	public void testLibTerm() { doAllTests("libterm"); }
	public void testLibTest() { doAllTests("libtest"); }
	public void testLibUV() { doAllTests("libuv"); }

	public void testLibRustC() {
		doAllTests("librustc", new String[] {
			"middle/typeck/infer/test.rs", // Not valid rust as of 574cbe5b07042c448c198af371803f977977b74f
		});
	}

	public void testLibStd() {
		doAllTests("libstd", new String[] {
			"vec.rs" // TODO: Unusual syntax 'let mut count_x @ mut count_y = 0;'
		});
	}

{'fraction_non_alphanumeric': 0.1289076866495035, 'fraction_numerical': 0.01140125045972784, 'mean_word_length': 5.553012048192771, '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': '3216954', 'n_tokens_mistral': 1813, 'n_tokens_neox': 1721, 'n_words': 458}