public Block(int p_idx, KaitaiStream p__io, IndexToParamExpr p__parent = null, IndexToParamExpr p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _idx     = p_idx;
     _read();
 }
Exemplo n.º 2
0
        public void TestIndexToParamExpr()
        {
            var r = IndexToParamExpr.FromFile(SourceFile("index_sizes.bin"));

            Assert.AreEqual(r.Qty, 3);
            Assert.AreEqual(r.Sizes[0], 1);
            Assert.AreEqual(r.Sizes[1], 8);
            Assert.AreEqual(r.Sizes[2], 4);
            Assert.AreEqual(r.Blocks[0].Buf, "A");
            Assert.AreEqual(r.Blocks[1].Buf, "BBBBBBBB");
            Assert.AreEqual(r.Blocks[2].Buf, "CCCC");
        }
 public IndexToParamExpr(KaitaiStream p__io, KaitaiStruct p__parent = null, IndexToParamExpr p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root ?? this;
     _read();
 }