mirror of
https://github.com/google/brotli.git
synced 2026-07-09 10:18:10 +00:00
Add Java port of Brotli decoder.
This commit is contained in:
27
java/dec/BitReaderTest.java
Executable file
27
java/dec/BitReaderTest.java
Executable file
@@ -0,0 +1,27 @@
|
||||
/* Copyright 2015 Google Inc. All Rights Reserved.
|
||||
|
||||
Distributed under MIT license.
|
||||
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
package org.brotli.dec;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/**
|
||||
* Tests for {@link BitReader}.
|
||||
*/
|
||||
@RunWith(JUnit4.class)
|
||||
public class BitReaderTest {
|
||||
|
||||
@Test(expected = BrotliRuntimeException.class)
|
||||
public void testReadAfterEos() {
|
||||
BitReader reader = new BitReader();
|
||||
BitReader.init(reader, new ByteArrayInputStream(new byte[1]));
|
||||
BitReader.readBits(reader, 9);
|
||||
BitReader.checkHealth(reader);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user