From 4efc1203ab5fb4965d081155a101e7b1a2f53047 Mon Sep 17 00:00:00 2001 From: Honfika Date: Thu, 17 Apr 2014 19:14:12 +0200 Subject: [PATCH] tests fixed --- .../com/jpexs/decompiler/flash/ActionScript2ParserTest.java | 3 ++- trunk/test/com/jpexs/decompiler/flash/RecompileTest.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java index 5b442f804..2392d58bc 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript2ParserTest.java @@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.parser.script.ActionScriptParser; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.tags.DoActionTag; +import com.jpexs.decompiler.graph.CompilationException; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; @@ -44,7 +45,7 @@ public class ActionScript2ParserTest extends ActionStript2TestBase { try { ActionScriptParser par = new ActionScriptParser(); asm.setActions(par.actionsFromString(script)); - } catch (IOException | ParseException ex) { + } catch (IOException | CompilationException | ParseException ex) { fail("Unable to parse: " + script); } } diff --git a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java index 4b2f8ceba..a6608edc1 100644 --- a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java @@ -29,6 +29,7 @@ import com.jpexs.decompiler.flash.tags.base.ContainerItem; import com.jpexs.decompiler.flash.treeitems.TreeItem; import com.jpexs.decompiler.flash.treenodes.TagNode; import com.jpexs.decompiler.flash.treenodes.TreeNode; +import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.TranslateException; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; @@ -92,7 +93,7 @@ public class RecompileTest { ActionScriptParser par = new ActionScriptParser(); try { asm.setActions(par.actionsFromString(as)); - } catch (ParseException ex) { + } catch (ParseException | CompilationException ex) { fail("Unable to parse: " + item.getSwf().getShortFileName() + "/" + item.toString()); } writer = new HilightedTextWriter(new CodeFormatting(), false); @@ -101,7 +102,7 @@ public class RecompileTest { as2 = asm.removePrefixAndSuffix(as2); try { asm.setActions(par.actionsFromString(as2)); - } catch (ParseException ex) { + } catch (ParseException | CompilationException ex) { fail("Unable to parse: " + item.getSwf().getShortFileName() + "/" + item.toString()); } writer = new HilightedTextWriter(new CodeFormatting(), false);