view src/test/java/fj/data/TestTreeMap.java @ 4:19c719aba746 default tip

change getLoop return value
author tatsuki
date Mon, 20 Apr 2015 08:09:22 +0900
parents fe80c1edf1be
children
line wrap: on
line source

package fj.data;

import fj.Ord;
import fj.P2;
import org.junit.Test;

import java.util.ArrayList;

/**
 * Created by MarkPerry on 2/06/2014.
 */
public class TestTreeMap {

    @Test
    public void testLargeInserts() {
        // check that inserting a large number of items performs ok
        // taken from https://code.google.com/p/functionaljava/issues/detail?id=31 and
        // https://github.com/functionaljava/functionaljava/pull/13/files
        final int n = 10000;
        TreeMap<Integer, String> m = TreeMap.empty(Ord.intOrd);
        for (int i = 0; i < n; i++) {
            m = m.set(i, "abc " + i);
        }
    }

}