use of net.runelite.cache.definitions.ScriptDefinition in project runelite by runelite.
the class AssemblerTest method testAssemble.
@Test
public void testAssemble() throws Exception {
InputStream in = AssemblerTest.class.getResourceAsStream(script);
Assert.assertNotNull(in);
Instructions instructions = new Instructions();
instructions.init();
Assembler assembler = new Assembler(instructions);
ScriptDefinition script = assembler.assemble(in);
// compare with disassembler
Disassembler disassembler = new Disassembler();
String out = disassembler.disassemble(script);
in = AssemblerTest.class.getResourceAsStream(this.script);
Assert.assertNotNull(in);
String original = new String(IOUtils.toByteArray(in));
logger.info(original);
logger.info("-----------------------");
logger.info(out);
Assert.assertEquals(original, out);
}
Aggregations