Beispiel #1
0
 public ParamsPassArrayInt(KaitaiStream p__io, KaitaiStruct p__parent = null, ParamsPassArrayInt p__root = null) : base(p__io)
 {
     m_parent   = p__parent;
     m_root     = p__root ?? this;
     f_intsCalc = false;
     _read();
 }
Beispiel #2
0
 public WantsInts(List <ushort> p_nums, KaitaiStream p__io, ParamsPassArrayInt p__parent = null, ParamsPassArrayInt p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _nums    = p_nums;
     _read();
 }
Beispiel #3
0
        public void TestParamsPassArrayInt()
        {
            var r = ParamsPassArrayInt.FromFile(SourceFile("position_to_end.bin"));

            Assert.AreEqual(r.PassInts.Nums.Count, 3);
            Assert.AreEqual(r.PassInts.Nums[0], 513);
            Assert.AreEqual(r.PassInts.Nums[1], 1027);
            Assert.AreEqual(r.PassInts.Nums[2], 1541);
            Assert.AreEqual(r.PassIntsCalc.Nums.Count, 2);
            Assert.AreEqual(r.PassIntsCalc.Nums[0], 27643);
            Assert.AreEqual(r.PassIntsCalc.Nums[1], 7);
        }