public WantsStrs(List <string> p_strs, KaitaiStream p__io, ParamsPassArrayStr p__parent = null, ParamsPassArrayStr p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _strs    = p_strs;
     _read();
 }
 public ParamsPassArrayStr(KaitaiStream p__io, KaitaiStruct p__parent = null, ParamsPassArrayStr p__root = null) : base(p__io)
 {
     m_parent       = p__parent;
     m_root         = p__root ?? this;
     f_strArrayCalc = false;
     _read();
 }
Beispiel #3
0
        public void TestParamsPassArrayStr()
        {
            var r = ParamsPassArrayStr.FromFile(SourceFile("term_strz.bin"));

            Assert.AreEqual(r.PassStrArray.Strs.Count, 3);
            Assert.AreEqual(r.PassStrArray.Strs[0], "fo");
            Assert.AreEqual(r.PassStrArray.Strs[1], "o|");
            Assert.AreEqual(r.PassStrArray.Strs[2], "ba");
            Assert.AreEqual(r.PassStrArrayCalc.Strs.Count, 2);
            Assert.AreEqual(r.PassStrArrayCalc.Strs[0], "aB");
            Assert.AreEqual(r.PassStrArrayCalc.Strs[1], "Cd");
        }