From 02aff9abfa831c0dfa4635724a4d33e01bc8393f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 22 Jan 2023 21:53:19 +0100 Subject: [PATCH] Tests fix --- .../jpexs/decompiler/flash/SWFStreamTest.java | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/SWFStreamTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/SWFStreamTest.java index cf659983f..568bd2739 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/SWFStreamTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/SWFStreamTest.java @@ -138,7 +138,7 @@ public class SWFStreamTest { assertTrue(Double.compare(7.5, sis.readFIXED("test")) == 0); sis.close(); - double[] dds = new double[]{5.25, 65535.25}; + double[] dds = new double[]{5.25, -5.25, 127.75, -128}; for (double dd : dds) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); SWFOutputStream sos = new SWFOutputStream(baos, SWF.DEFAULT_VERSION, Utf8Helper.charsetName); @@ -161,25 +161,7 @@ public class SWFStreamTest { assertEquals(ff, ff2, "Written and read value not equals. Written: " + ff + " read: " + ff2); sis.close(); } - } - - //@Test - public void testAllFIXED8() throws IOException { - for (int i = 0; i < 65536; i++) { - byte[] data = new byte[]{(byte) (i % 256), (byte) (i / 256)}; - SWFInputStream sis = new SWFInputStream(null, data); - float d = sis.readFIXED8("test"); - sis.close(); - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - SWFOutputStream sos = new SWFOutputStream(baos, SWF.DEFAULT_VERSION, Utf8Helper.charsetName); - sos.writeFIXED8(d); - sos.close(); - byte[] data2 = baos.toByteArray(); - - assertTrue(data[0] == data2[0] && data[1] == data2[1]); - } - } + } @Test public void testRECT() throws IOException {