Add id to script output

This commit is contained in:
Magic fTail
2018-11-26 07:59:48 +01:00
parent 6c1169c776
commit fb37e494d4
5 changed files with 7 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ public class ScriptSaverTest
instructions.init();
ScriptDefinition script = new Assembler(instructions).assemble(getClass().getResourceAsStream(SCRIPT_RESOURCE));
byte[] saved = new ScriptSaver().save(script);
ScriptDefinition loadedScripot = new ScriptLoader().load(0, saved);
ScriptDefinition loadedScripot = new ScriptLoader().load(91, saved);
assertEquals(script, loadedScripot);
}
@@ -59,7 +59,7 @@ public class ScriptSaverTest
instructions.init();
ScriptDefinition script = new Assembler(instructions).assemble(getClass().getResourceAsStream(SCRIPT_RESOURCE_UNICODE));
byte[] saved = new ScriptSaver().save(script);
ScriptDefinition loadedScripot = new ScriptLoader().load(0, saved);
ScriptDefinition loadedScripot = new ScriptLoader().load(1001, saved);
assertEquals(script, loadedScripot);
}

View File

@@ -1,3 +1,4 @@
.id 681
.int_stack_count 0
.string_stack_count 0
.int_var_count 2

View File

@@ -1,3 +1,4 @@
.id 91
.int_stack_count 2
.string_stack_count 1
.int_var_count 2

View File

@@ -1,3 +1,4 @@
.id 1001
.int_stack_count 0
.string_stack_count 0
.int_var_count 0