<commit_before>/*******************************************************************************
 * Copyright (c) 2013 itemis AG (http://www.itemis.eu) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package org.eclipse.xtext.generator;

import java.nio.charset.Charset;

import org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import com.google.common.base.Charsets;

/**
 * @author <NAME> - Initial contribution and API
 */
public class AntlrToolFacadeTest extends Assert {
	
	public static class TestableToolFacade extends AntlrToolFacade {
		@Override
		protected String getToolRunnerClassName() {
			return AntlrToolFacadeTest.MODE.getToolRunnerClassName();
		}
	}
	
	public enum Mode {
		OLD {

			@Override
			String getToolRunnerClassName() {
				return OldToolRunner.class.getName();
			}
			
		}, NEW {

			@Override
			String getToolRunnerClassName() {
				return NewToolRunner.class.getName();
			}<commit_msg>[xtext][antlr] Use the right ClassLoader in test<commit_after>/*******************************************************************************
 * Copyright (c) 2013 itemis AG (http://www.itemis.eu) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package org.eclipse.xtext.generator;

import java.nio.charset.Charset;

import org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import com.google.common.base.Charsets;

/**
 * @author <NAME> - Initial contribution and API
 */
public class AntlrToolFacadeTest extends Assert {
	
	public static class TestableToolFacade extends AntlrToolFacade {
		
		TestableToolFacade() {
			setLoader(AntlrToolFacadeTest.class.getClassLoader());
		}
		
		@Override
		protected String getToolRunnerClassName() {
			return AntlrToolFacadeTest.MODE.getToolRunnerClassName();
		}
	}
	
	public enum Mode {
		OLD {

			@Override
			String getToolRunnerClassName() {
				return OldToolRunner.class.getName();
			}
			
		}, NEW {

			@Override
			String getToolRunnerClassName() {
				return NewToolRunner.class.getName();
			}
{'fraction_non_alphanumeric': 0.20050578034682082, 'fraction_numerical': 0.005780346820809248, 'mean_word_length': 4.721074380165289, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '1698945', 'n_tokens_mistral': 835, 'n_tokens_neox': 728, 'n_words': 194}