mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-25 13:57:09 +00:00
AS1/2 direct editation - reordering of large (>256 items) constantpools
This commit is contained in:
@@ -12,10 +12,12 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash;
|
||||
|
||||
import com.jpexs.decompiler.flash.action.parser.script.ActionScript2Parser;
|
||||
import com.jpexs.decompiler.flash.action.swf4.ActionPush;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.graph.CompilationException;
|
||||
import java.io.IOException;
|
||||
@@ -91,4 +93,22 @@ public class ActionScript2ParserTest extends ActionScript2TestBase {
|
||||
+ " };\n"
|
||||
+ "}");
|
||||
}
|
||||
|
||||
@Test
|
||||
private void testAS2SimpleConstantPoolOrder() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < ActionPush.MAX_CONSTANT_INDEX_TYPE8; i++) {
|
||||
sb.append("trace(\"" + i + "\");\n");
|
||||
}
|
||||
parseAS2(sb.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
private void testAS2LargeConstantPoolOrder() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < ActionPush.MAX_CONSTANT_INDEX_TYPE8 + 100; i++) {
|
||||
sb.append("trace(\"" + i + "\");\n");
|
||||
}
|
||||
parseAS2(sb.toString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user