Example #1
0
        public void TypeCast()
        {
            var lhs = new Integer32("20");
            var rhs = new Integer64("5");

            Assert.True(lhs + rhs == new Self("25"));
            Assert.True(lhs + rhs != new Self("0"));
        }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = Char.GetHashCode();
         result = (result * 397) ^ Integer64.GetHashCode();
         result = (result * 397) ^ Decimal.GetHashCode();
         return(result);
     }
 }
Example #3
0
        public static void TestInteger64GetMutatorMinNullOptional()
        {
            const Dhgms.Nucleotide.Model.Info.CollectionType CollectionType = Dhgms.Nucleotide.Model.Info.CollectionType.GenericLinkedList;
            const string Name = "Name";
            const string Description = "Description";
            const bool Optional = false;

            Integer64 instance = new Integer64(
                CollectionType,
                Name,
                Description,
                Optional,
                null,
                255,
                true,
                null);

            Console.Write(instance.GetMutator());
        }
Example #4
0
        public static void TestInteger64ConstructorBasicArguments()
        {
            const Dhgms.Nucleotide.Model.Info.CollectionType CollectionType = Dhgms.Nucleotide.Model.Info.CollectionType.GenericLinkedList;
            const string Name = "Name";
            const string Description = "Description";
            const bool Optional = false;

            Integer64 instance = new Integer64(
                CollectionType,
                Name,
                Description,
                Optional,
                null,
                null,
                true,
                null);

            Assert.Equal(CollectionType, instance.Collection);
            Assert.Equal(Name, instance.Name);
            Assert.Equal(Description, instance.Description);
            Assert.Equal(Optional, instance.Optional);
        }
Example #5
0
 public void Visit(Integer64 value)
 {
     value.TypedValue = mBitsReader.ReadInt64(value.BitsCount);
 }