// Path: hppc/src/test/java/com/carrotsearch/hppc/TestUtils.java
// public static void assertEquals2(double a, double b) {
//   org.junit.Assert.assertEquals(a, b, delta);
// }
// 
// Path: hppc/src/test/java/com/carrotsearch/hppc/TestUtils.java
// public static void assertSortedListEquals(Object[] array, Object... elements) {
//   assertEquals(elements.length, array.length);
//   Arrays.sort(array);
//   assertArrayEquals(elements, array);
// }


import com.carrotsearch.hppc.cursors.*;
import com.carrotsearch.hppc.predicates.*;
import com.carrotsearch.hppc.procedures.*;
import org.assertj.core.api.Assertions;
import org.junit.After;
import org.junit.Test;
import java.util.*;
import static com.carrotsearch.hppc.TestUtils.assertEquals2;
import static com.carrotsearch.hppc.TestUtils.assertSortedListEquals;
import static org.junit.Assert.*;
/*! #set($TemplateOptions.ignored = ($TemplateOptions.isKTypeAnyOf("DOUBLE", "FLOAT", "BYTE"))) !*/
package com.carrotsearch.hppc;




/**
 * Tests for {@link KTypeVTypeWormMap}.
 */
/* ! ${TemplateOptions.generatedAnnotation} ! */
public class KTypeVTypeWormMapTest<KType, VType> extends AbstractKTypeVTypeTest<KType, VType>
{
    /**
     * Per-test fresh initialized instance.
     */
    public KTypeVTypeWormMap<KType, VType> map = newInstance();
    
    protected KTypeVTypeWormMap<KType, VType> newInstance() {
      return new KTypeVTypeWormMap<>();
    }

    @After
    public void checkEmptySlotsUninitialized()
    {
        if (map != null)
        {
            int occupied = 0;
            int max = map.keys.length;
            for (int i = 0; i < max; i++)
            {
                if (map.next[i] == 0)
                {

                    /*! #if ($TemplateOptions.KTypeGeneric) !*/
// Path: hppc/src/test/java/com/carrotsearch/hppc/TestUtils.java
// public static void assertEquals2(double a, double b) {
//   org.junit.Assert.assertEquals(a, b, delta);
// }
// 
// Path: hppc/src/test/java/com/carrotsearch/hppc/TestUtils.java
// public static void assertSortedListEquals(Object[] array, Object... elements) {
//   assertEquals(elements.length, array.length);
//   Arrays.sort(array);
//   assertArrayEquals(elements, array);
// }


// Path: hppc/src/test/templates/com/carrotsearch/hppc/KTypeVTypeWormMapTest.java
import com.carrotsearch.hppc.cursors.*;
import com.carrotsearch.hppc.predicates.*;
import com.carrotsearch.hppc.procedures.*;
import org.assertj.core.api.Assertions;
import org.junit.After;
import org.junit.Test;
import java.util.*;
import static com.carrotsearch.hppc.TestUtils.assertEquals2;
import static com.carrotsearch.hppc.TestUtils.assertSortedListEquals;
import static org.junit.Assert.*;

/*! #set($TemplateOptions.ignored = ($TemplateOptions.isKTypeAnyOf("DOUBLE", "FLOAT", "BYTE"))) !*/
package com.carrotsearch.hppc;




/**
 * Tests for {@link KTypeVTypeWormMap}.
 */
/* ! ${TemplateOptions.generatedAnnotation} ! */
public class KTypeVTypeWormMapTest<KType, VType> extends AbstractKTypeVTypeTest<KType, VType>
{
    /**
     * Per-test fresh initialized instance.
     */
    public KTypeVTypeWormMap<KType, VType> map = newInstance();
    
    protected KTypeVTypeWormMap<KType, VType> newInstance() {
      return new KTypeVTypeWormMap<>();
    }

    @After
    public void checkEmptySlotsUninitialized()
    {
        if (map != null)
        {
            int occupied = 0;
            int max = map.keys.length;
            for (int i = 0; i < max; i++)
            {
                if (map.next[i] == 0)
                {

                    /*! #if ($TemplateOptions.KTypeGeneric) !*/
                    TestUtils.assertEquals2(Intrinsics.<KType> empty(), map.keys[i]);