public void TestSwitchManualInt() { var r = SwitchManualInt.FromFile(SourceFile("switch_opcodes.bin")); Assert.AreEqual(r.Opcodes.Count, 4); Assert.AreEqual(r.Opcodes[0].Code, 83); Assert.AreEqual(((SwitchManualInt.Opcode.Strval)(r.Opcodes[0].Body)).Value, "foobar"); Assert.AreEqual(r.Opcodes[1].Code, 73); Assert.AreEqual(((SwitchManualInt.Opcode.Intval)(r.Opcodes[1].Body)).Value, 66); Assert.AreEqual(r.Opcodes[2].Code, 73); Assert.AreEqual(((SwitchManualInt.Opcode.Intval)(r.Opcodes[2].Body)).Value, 55); Assert.AreEqual(r.Opcodes[3].Code, 83); Assert.AreEqual(((SwitchManualInt.Opcode.Strval)(r.Opcodes[3].Body)).Value, ""); }
public Intval(KaitaiStream p__io, SwitchManualInt.Opcode p__parent = null, SwitchManualInt p__root = null) : base(p__io) { m_parent = p__parent; m_root = p__root; _read(); }
public SwitchManualInt(KaitaiStream p__io, KaitaiStruct p__parent = null, SwitchManualInt p__root = null) : base(p__io) { m_parent = p__parent; m_root = p__root ?? this; _read(); }