示例#1
0
        public void TestRepeatUntilSized()
        {
            var r = RepeatUntilSized.FromFile(SourceFile("repeat_until_process.bin"));

            Assert.AreEqual(r.Records.Count, 3);
            Assert.AreEqual(r.Records[0].Marker, 232);
            Assert.AreEqual(r.Records[0].Body, 2863311546);
            Assert.AreEqual(r.Records[1].Marker, 250);
            Assert.AreEqual(r.Records[1].Body, 2863315102);
            Assert.AreEqual(r.Records[2].Marker, 170);
            Assert.AreEqual(r.Records[2].Body, 1431655765);
        }
        public void TestRepeatUntilSized()
        {
            var r = RepeatUntilSized.FromFile(SourceFile("repeat_until_process.bin"));

            Assert.AreEqual(r.Records.Count, 3);

            Assert.AreEqual(r.Records[0].Marker, 0xe8);
            Assert.AreEqual(r.Records[0].Body, 0xaaaaaaba);

            Assert.AreEqual(r.Records[1].Marker, 0xfa);
            Assert.AreEqual(r.Records[1].Body, 0xaaaab89e);

            Assert.AreEqual(r.Records[2].Marker, 0xaa);
            Assert.AreEqual(r.Records[2].Body, 0x55555555);
        }
 public Record(KaitaiStream p__io, RepeatUntilSized p__parent = null, RepeatUntilSized p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }
 public RepeatUntilSized(KaitaiStream p__io, KaitaiStruct p__parent = null, RepeatUntilSized p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root ?? this;
     _read();
 }