public void TestSwitchManualIntElse() { var r = SwitchManualIntElse.FromFile(SourceFile("switch_opcodes2.bin")); Assert.AreEqual(r.Opcodes.Count, 4); Assert.AreEqual(r.Opcodes[0].Code, 83); Assert.AreEqual(((SwitchManualIntElse.Opcode.Strval)(r.Opcodes[0].Body)).Value, "foo"); Assert.AreEqual(r.Opcodes[1].Code, 88); Assert.AreEqual(((SwitchManualIntElse.Opcode.Noneval)(r.Opcodes[1].Body)).Filler, 66); Assert.AreEqual(r.Opcodes[2].Code, 89); Assert.AreEqual(((SwitchManualIntElse.Opcode.Noneval)(r.Opcodes[2].Body)).Filler, 51966); Assert.AreEqual(r.Opcodes[3].Code, 73); Assert.AreEqual(((SwitchManualIntElse.Opcode.Intval)(r.Opcodes[3].Body)).Value, 7); }
public Intval(KaitaiStream p__io, SwitchManualIntElse.Opcode p__parent = null, SwitchManualIntElse p__root = null) : base(p__io) { m_parent = p__parent; m_root = p__root; _read(); }
public SwitchManualIntElse(KaitaiStream p__io, KaitaiStruct p__parent = null, SwitchManualIntElse p__root = null) : base(p__io) { m_parent = p__parent; m_root = p__root ?? this; _read(); }