public void TestTypeTernary2ndFalsy()
        {
            var r = TypeTernary2ndFalsy.FromFile(SourceFile("switch_integers.bin"));

            Assert.AreEqual(r.VFalse, false);
            Assert.AreEqual(r.VIntZero, 0);
            Assert.AreEqual(r.VIntNegZero, -0);
            Assert.AreEqual(r.VFloatZero, 0.0, 1e-6);
            Assert.AreEqual(r.VFloatNegZero, -0.0, 1e-6);
            Assert.AreEqual(r.VStrWZero, "0");
            Assert.AreEqual(r.VStrWZero.Length, 1);
            Assert.AreEqual(r.Ut.M, 7);
            Assert.IsNull(r.VNullUt);
            Assert.AreEqual(r.VStrEmpty, "");
            Assert.AreEqual(r.VStrEmpty.Length, 0);
            Assert.AreEqual(r.IntArray.Count, 2);
            Assert.AreEqual(r.VIntArrayEmpty.Count, 0);
        }
Exemplo n.º 2
0
 public Foo(KaitaiStream p__io, TypeTernary2ndFalsy p__parent = null, TypeTernary2ndFalsy p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }
Exemplo n.º 3
0
 public TypeTernary2ndFalsy(KaitaiStream p__io, KaitaiStruct p__parent = null, TypeTernary2ndFalsy p__root = null) : base(p__io)
 {
     m_parent         = p__parent;
     m_root           = p__root ?? this;
     f_nullUt         = false;
     f_vFloatZero     = false;
     f_t              = false;
     f_vIntNegZero    = false;
     f_vIntZero       = false;
     f_vFalse         = false;
     f_vStrEmpty      = false;
     f_vIntArrayEmpty = false;
     f_vNullUt        = false;
     f_vFloatNegZero  = false;
     f_vStrWZero      = false;
     _read();
 }