Esempio n. 1
0
        private void testgoodvalue(int n, Object value)
        {
            TypeValidator v = Validator_string.Get(n);

            Assert.IsTrue(v.Validate(value));
            Assert.IsTrue(validateValueOk(v, value));
        }
Esempio n. 2
0
        private void testelementvalidator(int n, string descr, Type expectedClass)
        {
            TypeValidator v = (TypeValidator)Validator_string.Get(n).ElementValidator();

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

            Assert.AreEqual(n, v.GetNDims());
            Assert.AreSame(expectedClass, v.GetExpectedClass());
            Assert.AreEqual(descr, v.ToString());
        }
Esempio n. 4
0
        public static void Init(XType type, Class2TypeMap class2type)
        {
            Field field = type.GetField(FIELD_NAME);

            class2type.Add(typeof(_Etch_RuntimeException), type);
            type.SetComponentType(typeof(_Etch_RuntimeException));
            type.SetImportExportHelper(new RuntimeExceptionSerializer(type, field));
            type.PutValidator(field, Validator_string.Get(0));
            type.Lock();
        }
Esempio n. 5
0
        public void Test_string()
        {
            Test(Validator_string.Get(2), 2,

                 new String[][] { new String[] { "", "" }, new String[] { "", "" } });

            Test(Validator_string.Get(2), 2,

                 new String[][] { new String[] { "abc", "abc" }, new String[] { "abc", "abc" } });
        }
Esempio n. 6
0
 public void constructor3()
 {
     Validator_string.Get(Validator.MAX_NDIMS + 1);
 }
Esempio n. 7
0
 public void constructor2()
 {
     Validator_string.Get(-1);
 }
Esempio n. 8
0
 public void elementvalidator2()
 {
     Validator_string.Get(0).ElementValidator();
 }