Exemplo n.º 1
0
        public void GetInt()
        {
            PListInteger element = _basicPlist.Root["IntValue"] as PListInteger;

            Assert.IsNotNull(element);
            Assert.AreEqual(element.IntValue, 10);
        }
Exemplo n.º 2
0
        protected override void DrawInt(PListInteger element)
        {
            EditorGUI.BeginChangeCheck();
            var value = EditorGUILayout.IntField(element.IntValue);

            if (EditorGUI.EndChangeCheck())
            {
                element.IntValue = value;
                IsDirty          = true;
            }
        }
Exemplo n.º 3
0
        public void SpecifiedConstructor()
        {
            PListInteger i = new PListInteger(int.MaxValue);

            Assert.AreEqual(i.IntValue, int.MaxValue);
            PListInteger ui = new PListInteger(uint.MaxValue);

            Assert.AreEqual(ui.UIntValue, uint.MaxValue);
            PListInteger s = new PListInteger(short.MaxValue);

            Assert.AreEqual(s.ShortValue, short.MaxValue);
            PListInteger us = new PListInteger(ushort.MaxValue);

            Assert.AreEqual(us.UShortValue, ushort.MaxValue);
            PListInteger l = new PListInteger(long.MaxValue);

            Assert.AreEqual(l.LongValue, long.MaxValue);
            PListInteger ul = new PListInteger(ulong.MaxValue);

            Assert.AreEqual(ul.ULongValue, ulong.MaxValue);
        }
Exemplo n.º 4
0
 protected abstract void DrawInt(PListInteger element);
Exemplo n.º 5
0
 protected override void DrawInt(PListInteger element)
 {
     Style.MinWidthLabel(element.ToString(), PADDING);
 }
Exemplo n.º 6
0
 public void SetUp()
 {
     _element = new PListInteger();
 }