Esempio n. 1
0
        public void TestSwitchIntegers()
        {
            var r = SwitchIntegers.FromFile(SourceFile("switch_integers.bin"));

            Assert.AreEqual(r.Opcodes.Count, 4);
            Assert.AreEqual(r.Opcodes[0].Code, 1);
            Assert.AreEqual(r.Opcodes[0].Body, 7);
            Assert.AreEqual(r.Opcodes[1].Code, 2);
            Assert.AreEqual(r.Opcodes[1].Body, 16448);
            Assert.AreEqual(r.Opcodes[2].Code, 4);
            Assert.AreEqual(r.Opcodes[2].Body, 4919);
            Assert.AreEqual(r.Opcodes[3].Code, 8);
            Assert.AreEqual(r.Opcodes[3].Body, 4919);
        }
 public Opcode(KaitaiStream p__io, SwitchIntegers p__parent = null, SwitchIntegers p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }
 public SwitchIntegers(KaitaiStream p__io, KaitaiStruct p__parent = null, SwitchIntegers p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root ?? this;
     _read();
 }