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

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

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

            Assert.AreEqual(n, v.GetNDims());
            Assert.AreSame(expectedClass, v.GetExpectedClass());
            Assert.AreEqual(descr, v.ToString());
        }
示例#4
0
        public void Test_double()
        {
            Test(Validator_double.Get(2), 2,

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

            Test(Validator_double.Get(2), 2,

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

            Test(Validator_double.Get(2), 2,

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

            Test(Validator_double.Get(2), 2,

                 new double[][] { new double[] { Double.MaxValue, Double.MaxValue }, new double[] { Double.MaxValue, Double.MaxValue } });

            Test(Validator_double.Get(2), 2,

                 new double[][] { new double[] { Double.MinValue, Double.MinValue }, new double[] { Double.MinValue, Double.MinValue } });
        }
示例#5
0
 public void constructor3()
 {
     Validator_double.Get(Validator.MAX_NDIMS + 1);
 }
示例#6
0
 public void constructor2()
 {
     Validator_double.Get(-1);
 }
示例#7
0
 public void elementvalidator2()
 {
     Validator_double.Get(0).ElementValidator();
 }