public SwitchCast(KaitaiStream p__io, KaitaiStruct p__parent = null, SwitchCast p__root = null) : base(p__io) { m_parent = p__parent; m_root = p__root ?? this; f_firstObj = false; f_secondVal = false; f_errCast = false; _read(); }
public void TestSwitchCast() { var r = SwitchCast.FromFile(SourceFile("switch_opcodes.bin")); Assert.AreEqual(r.FirstObj.Value, "foobar"); Assert.AreEqual(r.SecondVal, 0x42); Assert.Throws <InvalidCastException>( delegate { var tmp = r.ErrCast; } ); }
public Intval(KaitaiStream p__io, SwitchCast.Opcode p__parent = null, SwitchCast p__root = null) : base(p__io) { m_parent = p__parent; m_root = p__root; _read(); }