mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-10 20:42:32 +00:00
Fixed #1769 Missing some body trait variable declaration
This commit is contained in:
@@ -65,12 +65,10 @@ public class ABCStreamTest {
|
||||
@Test
|
||||
public void testU30() {
|
||||
for (long number : getTestNumbers(0, (1L << 30) - 1)) {
|
||||
try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ABCOutputStream aos = new ABCOutputStream(baos);) {
|
||||
try ( ByteArrayOutputStream baos = new ByteArrayOutputStream(); ABCOutputStream aos = new ABCOutputStream(baos);) {
|
||||
aos.writeU30(number);
|
||||
aos.close();
|
||||
try (MemoryInputStream mis = new MemoryInputStream(baos.toByteArray());
|
||||
ABCInputStream ais = new ABCInputStream(mis);) {
|
||||
try ( MemoryInputStream mis = new MemoryInputStream(baos.toByteArray()); ABCInputStream ais = new ABCInputStream(mis);) {
|
||||
assertEquals(number, ais.readU30("test"));
|
||||
assertEquals(0, mis.available());
|
||||
}
|
||||
@@ -83,12 +81,10 @@ public class ABCStreamTest {
|
||||
@Test
|
||||
public void testU32() {
|
||||
for (long number : getTestNumbers(0, (1L << 32) - 1)) {
|
||||
try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ABCOutputStream aos = new ABCOutputStream(baos);) {
|
||||
try ( ByteArrayOutputStream baos = new ByteArrayOutputStream(); ABCOutputStream aos = new ABCOutputStream(baos);) {
|
||||
aos.writeU32(number);
|
||||
aos.close();
|
||||
try (MemoryInputStream mis = new MemoryInputStream(baos.toByteArray());
|
||||
ABCInputStream ais = new ABCInputStream(mis);) {
|
||||
try ( MemoryInputStream mis = new MemoryInputStream(baos.toByteArray()); ABCInputStream ais = new ABCInputStream(mis);) {
|
||||
assertEquals(number, ais.readU32("test"));
|
||||
assertEquals(0, mis.available());
|
||||
}
|
||||
@@ -101,12 +97,10 @@ public class ABCStreamTest {
|
||||
@Test
|
||||
public void testS32() {
|
||||
for (long number : getTestNumbers(-(1L << 31), (1 << 31) - 1)) {
|
||||
try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ABCOutputStream aos = new ABCOutputStream(baos);) {
|
||||
try ( ByteArrayOutputStream baos = new ByteArrayOutputStream(); ABCOutputStream aos = new ABCOutputStream(baos);) {
|
||||
aos.writeS32(number);
|
||||
aos.close();
|
||||
try (MemoryInputStream mis = new MemoryInputStream(baos.toByteArray());
|
||||
ABCInputStream ais = new ABCInputStream(mis);) {
|
||||
try ( MemoryInputStream mis = new MemoryInputStream(baos.toByteArray()); ABCInputStream ais = new ABCInputStream(mis);) {
|
||||
assertEquals(number, ais.readS32("test"));
|
||||
assertEquals(0, mis.available());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user