<commit_before>package nl.utwente.group10.haskell.expr;

import nl.utwente.group10.haskell.env.Env;
import nl.utwente.group10.haskell.exceptions.HaskellTypeError;
import nl.utwente.group10.haskell.hindley.GenSet;
import nl.utwente.group10.haskell.type.ConstT;
import nl.utwente.group10.haskell.type.FuncT;
import nl.utwente.group10.haskell.type.Type;
import nl.utwente.group10.haskell.type.VarT;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

public class IdentTest {
    private final Type alpha = new VarT("a");
    private final Type integer = new ConstT("Integer");

    private Env env;
    private GenSet genSet;

    @Before
    public final void setUp() {
        this.env = new Env();
        this.genSet = new GenSet();

        this.env.put("id", new FuncT(this.alpha, this.alpha));
    }

    @Test
    public final void testAnalyze() throws HaskellTypeError {
        assertEquals(new FuncT(this.alpha, this.alpha).toHaskellType(), new Ident("id").analyze(this.env, this.genSet).toHaskellType());
    }

    @Test
    public final void testToHaskell() throws HaskellTypeError {
        assertEquals("id", new Ident("id").toHaskell());
    }

    @Test(expected=HaskellTypeError.class)
    public final void testIncorrectName() throws HaskellTypeError {
        new Ident("id").analyze(new Env(), new GenSet());
        assertTrue("Invalid state reached: exception not raised.", false);
    }
}<commit_msg>Remove useless assertion from IdentTest<commit_after>package nl.utwente.group10.haskell.expr;

import nl.utwente.group10.haskell.env.Env;
import nl.utwente.group10.haskell.exceptions.HaskellTypeError;
import nl.utwente.group10.haskell.hindley.GenSet;
import nl.utwente.group10.haskell.type.ConstT;
import nl.utwente.group10.haskell.type.FuncT;
import nl.utwente.group10.haskell.type.Type;
import nl.utwente.group10.haskell.type.VarT;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

public class IdentTest {
    private final Type alpha = new VarT("a");
    private final Type integer = new ConstT("Integer");

    private Env env;
    private GenSet genSet;

    @Before
    public final void setUp() {
        this.env = new Env();
        this.genSet = new GenSet();

        this.env.put("id", new FuncT(this.alpha, this.alpha));
    }

    @Test
    public final void testAnalyze() throws HaskellTypeError {
        assertEquals(new FuncT(this.alpha, this.alpha).toHaskellType(), new Ident("id").analyze(this.env, this.genSet).toHaskellType());
    }

    @Test
    public final void testToHaskell() throws HaskellTypeError {
        assertEquals("id", new Ident("id").toHaskell());
    }

    @Test(expected=HaskellTypeError.class)
    public final void testIncorrectName() throws HaskellTypeError {
        new Ident("id").analyze(new Env(), new GenSet());
    }
}

{'fraction_non_alphanumeric': 0.12508735150244585, 'fraction_numerical': 0.011180992313067784, 'mean_word_length': 3.755813953488372, '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': '7249459', 'n_tokens_mistral': 978, 'n_tokens_neox': 924, 'n_words': 199}