<commit_before>package net.folab.fo.runtime._fo._lang;

import static net.folab.fo.runtime._fo._lang.Boolean.*;
import static net.folab.fo.runtime._fo._lang.Integer.*;

import net.folab.fo.runtime.Evaluable;
import net.folab.fo.runtime.Function;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class BooleanTest {

    @Before
    public void setUp() throws Exception {
    }

    @After
    public void tearDown() throws Exception {
    }

    @Test
    public void test() {

        Function<Evaluable<Boolean>, Function<Evaluable<Boolean>, Evaluable<Boolean>>> falseChoose = FALSE
                .choose();
        Function<Evaluable<Boolean>, Function<Evaluable<Boolean>, Evaluable<Boolean>>> trueChoose = TRUE
                .choose();

        System.out.println(falseChoose.apply(FALSE).apply(TRUE).evaluate()
                .getValue());
        System.out.println(trueChoose.apply(FALSE).apply(TRUE).evaluate()
                .getValue());

    }

    @Test
    public void testI() {

        Function<Evaluable<Integer>, Function<Evaluable<Integer>, Evaluable<Integer>>> falseChoose = FALSE
                .choose();
        Function<Evaluable<Integer>, Function<Evaluable<Integer>, Evaluable<Integer>>> trueChoose = TRUE
                .choose();

        System.out.println(falseChoose.apply(valueOf(1)).apply(valueOf(0))
                .evaluate().getValue());
        System.out.println(trueChoose.apply(valueOf(1)).apply(valueOf(0))
                .evaluate().getValue());

    }

}<commit_msg>Clean up codes as test case<commit_after>package net.folab.fo.runtime._fo._lang;

import static net.folab.fo.runtime._fo._lang.Boolean.*;
import static net.folab.fo.runtime._fo._lang.Integer.*;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;

import net.folab.fo.runtime._fo._lang._Boolean.choose;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class BooleanTest {

    @Before
    public void setUp() throws Exception {
    }

    @After
    public void tearDown() throws Exception {
    }

    @Test
    public void test_Boolean() {

        choose<Boolean> f = FALSE.choose();
        choose<Boolean> t = TRUE.choose();

        assertTrue(f.apply(FALSE).apply(TRUE).evaluate().getValue());
        assertFalse(t.apply(FALSE).apply(TRUE).evaluate().getValue());

    }

    @Test
    public void test_Integer() {

        choose<Integer> f = FALSE.choose();
        choose<Integer> t = TRUE.choose();

        Integer one = valueOf(1);
        Integer zero = valueOf(0);

        assertThat(f.apply(one).apply(zero).evaluate().getValue(), is(0));
        assertThat(t.apply(one).apply(zero).evaluate().getValue(), is(1));

    }

}
{'fraction_non_alphanumeric': 0.14197306152166, 'fraction_numerical': 0.0029122679286494356, 'mean_word_length': 2.9596541786743518, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '14135', 'n_tokens_mistral': 828, 'n_tokens_neox': 775, 'n_words': 147}