package net.jpountz.xxhash;

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import junit.framework.TestCase;

public class XXHashFactoryTest extends TestCase {

  public void test() {
    assertEquals(XXHash32JNI.INSTANCE, XXHashFactory.nativeInstance().hash32());
    assertEquals(XXHash32JavaUnsafe.INSTANCE, XXHashFactory.unsafeInstance().hash32());
    assertEquals(XXHash32JavaSafe.INSTANCE, XXHashFactory.safeInstance().hash32());
  }

}

@@ -1028,167 +1028,483 @@
 sert
-Equals(XXHash32JavaUnsafe.INSTANCE, XXHashFactory.unsafeInstance().hash32());%0A    assertEquals(XXHash32JavaSafe.INSTANCE, XXHashFactory.safeInstance().hash32()
+True(XXHashFactory.nativeInstance().newStreamingHash32(0) instanceof StreamingXXHash32JNI);%0A    assertEquals(XXHash32JavaUnsafe.INSTANCE, XXHashFactory.unsafeInstance().hash32());%0A    assertTrue(XXHashFactory.unsafeInstance().newStreamingHash32(0) instanceof StreamingXXHash32JavaUnsafe);%0A    assertEquals(XXHash32JavaSafe.INSTANCE, XXHashFactory.safeInstance().hash32());%0A    assertTrue(XXHashFactory.safeInstance().newStreamingHash32(0) instanceof StreamingXXHash32JavaSafe
 );%0A 

Test streaming factories.