package com.jsoniter;

import com.jsoniter.spi.Slice;
import junit.framework.TestCase;

import java.util.HashMap;

public class TestSlice extends TestCase {

    public void test_equals() {
        assertTrue(Slice.make("hello").equals(Slice.make("hello")));
        assertTrue(Slice.make("hello").equals(new Slice("ahello".getBytes(), 1, 6)));
    }

    public void test_hashcode() {
        HashMap map = new HashMap();
        map.put(Slice.make("hello"), "hello");
        map.put(Slice.make("world"), "world");
        assertEquals("hello", map.get(Slice.make("hello")));
        assertEquals("world", map.get(Slice.make("world")));
    }
}

@@ -638,10 +638,828 @@
 ;%0A    %7D%0A
+    %0A    public void test_equalsInputNotNullOutputFalse2() %7B%0A%0A        // Arrange%0A        final byte%5B%5D byteArray = %7B(byte)2, (byte)1%7D;%0A        final Slice objectUnderTest = new Slice(byteArray, 0, 1073741825);%0A        final byte%5B%5D byteArray1 = %7B(byte)0%7D;%0A        final Slice o = new Slice(byteArray1, 0, 1073741825);%0A    %0A        // Act%0A        final boolean retval = objectUnderTest.equals(o);%0A    %0A        // Assert result%0A        assertEquals(false, retval);%0A      %7D%0A%0A      public void test_equalsInputNotNullOutputFalse() %7B%0A%0A        // Arrange%0A        final Slice objectUnderTest = new Slice(null, 0, -2147483646);%0A        final Slice o = new Slice(null, 0, 2);%0A    %0A        // Act%0A        final boolean retval = objectUnderTest.equals(o);%0A    %0A        // Assert result%0A        assertEquals(false, retval);%0A      %7D%0A
 %7D%0A

Add tests for TestSlice.class