コード例 #1
0
        public void TestSwitchRepeatExpr()
        {
            var r = SwitchRepeatExpr.FromFile(SourceFile("switch_tlv.bin"));

            Assert.AreEqual(r.Code, 0x11);
            Assert.AreEqual(r.Size, 9);
            Assert.AreEqual(((SwitchRepeatExpr.One)r.Body[0]).First, System.Text.Encoding.ASCII.GetBytes("Stuff\0Me\0"));
        }
コード例 #2
0
        public void TestSwitchRepeatExpr()
        {
            var r = SwitchRepeatExpr.FromFile(SourceFile("switch_tlv.bin"));

            Assert.AreEqual(r.Code, 17);
            Assert.AreEqual(r.Size, 9);
            Assert.AreEqual(((SwitchRepeatExpr.One)(r.Body[0])).First, new byte[] { 83, 116, 117, 102, 102, 0, 77, 101, 0 });
        }
コード例 #3
0
 public Two(KaitaiStream p__io, SwitchRepeatExpr p__parent = null, SwitchRepeatExpr p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }
コード例 #4
0
 public SwitchRepeatExpr(KaitaiStream p__io, KaitaiStruct p__parent = null, SwitchRepeatExpr p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root ?? this;
     _read();
 }