public ExprBits(KaitaiStream p__io, KaitaiStruct p__parent = null, ExprBits p__root = null) : base(p__io) { m_parent = p__parent; m_root = p__root ?? this; f_enumInst = false; f_instPos = false; _read(); }
public void TestExprBits() { var r = ExprBits.FromFile(SourceFile("switch_opcodes.bin")); Assert.AreEqual(r.A, 2); Assert.AreEqual(r.EnumSeq, ExprBits.Items.Foo); Assert.AreEqual(r.ByteSize, new byte[] { 102, 111 }); Assert.AreEqual(r.RepeatExpr.Count, 2); Assert.AreEqual(r.RepeatExpr[0], 111); Assert.AreEqual(r.RepeatExpr[1], 98); Assert.AreEqual(r.SwitchOnType, 97); Assert.AreEqual(r.SwitchOnEndian.Foo, 29184); Assert.AreEqual(r.EnumInst, ExprBits.Items.Bar); Assert.AreEqual(r.InstPos, 111); }
public EndianSwitch(KaitaiStream p__io, ExprBits p__parent = null, ExprBits p__root = null) : base(p__io) { m_parent = p__parent; m_root = p__root; _read(); }