Exemple #1
0
        public void TestCastNested()
        {
            var r = CastNested.FromFile(SourceFile("switch_opcodes.bin"));

            Assert.AreEqual(r.Opcodes0Str.Value, "foobar");
            Assert.AreEqual(r.Opcodes0StrValue, "foobar");
            Assert.AreEqual(r.Opcodes1Int.Value, 66);
            Assert.AreEqual(r.Opcodes1IntValue, 66);
        }
 public CastNested(KaitaiStream p__io, KaitaiStruct p__parent = null, CastNested p__root = null) : base(p__io)
 {
     m_parent           = p__parent;
     m_root             = p__root ?? this;
     f_opcodes0Str      = false;
     f_opcodes0StrValue = false;
     f_opcodes1Int      = false;
     f_opcodes1IntValue = false;
     _read();
 }
 public Intval(KaitaiStream p__io, CastNested.Opcode p__parent = null, CastNested p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }