Example #1
0
        private void testbadvalue(int n, Object value)
        {
            TypeValidator v = Validator_byte.Get(n);

            Assert.IsFalse(v.Validate(value));
            Assert.IsFalse(ValidateValueOk(v, value));
        }
Example #2
0
        private void testelementvalidator(int n, String descr, Type expectedClass)
        {
            TypeValidator v = (TypeValidator)Validator_byte.Get(n).ElementValidator();

            Assert.AreEqual(n - 1, v.GetNDims());
            Assert.AreSame(expectedClass, v.GetExpectedClass());
            Assert.AreEqual(descr, v.ToString());
        }
Example #3
0
        private void testconstructor(int n, String descr, Type expectedClass)
        {
            TypeValidator v = Validator_byte.Get(n);

            Assert.AreEqual(n, v.GetNDims());
            Assert.AreSame(expectedClass, v.GetExpectedClass());
            Assert.AreEqual(descr, v.ToString());
        }
Example #4
0
        public void Test_SByte()
        {
            Test(Validator_byte.Get(2), 2,

                 new SByte[][] { new SByte[] { 0, 0 }, new SByte[] { 0, 0 } });

            Test(Validator_byte.Get(2), 2,

                 new SByte[][] { new SByte[] { 1, 1 }, new SByte[] { 1, 1 } });

            Test(Validator_byte.Get(2), 2,

                 new SByte[][] { new SByte[] { -1, -1 }, new SByte[] { -1, -1 } });

            Test(Validator_byte.Get(2), 2,

                 new SByte[][] { new SByte[] { SByte.MaxValue, SByte.MinValue }, new SByte[] { SByte.MaxValue, SByte.MinValue } });

            Test(Validator_byte.Get(2), 2,

                 new SByte[][] { new SByte[] { SByte.MinValue, SByte.MinValue }, new SByte[] { SByte.MinValue, SByte.MinValue } });
        }
Example #5
0
 public void constructor3()
 {
     Validator_byte.Get(Validator.MAX_NDIMS + 1);
 }
Example #6
0
 public void constructor2()
 {
     Validator_byte.Get(-1);
 }
Example #7
0
 public void elementvalidator2()
 {
     Validator_byte.Get(0).ElementValidator();
 }