Пример #1
0
        public void ArrayReturnFromFunction()
        {
            var method   = typeof(helperFunctions).GetMethod("CallMe");
            var callExpr = Expression.Call(null, method);
            var result   = new ValSimple("main", typeof(float[]));

            Assert.AreEqual("main", result.AsObjectReference(callExpr));
        }
Пример #2
0
        public void TestParameterArrayObj()
        {
            var sv  = new ValSimple("main", typeof(int[]));
            var p   = Expression.Parameter(typeof(int[]), "main");
            var r   = Expression.Constant(1);
            var arr = Expression.ArrayIndex(p, r);

            Assert.AreEqual("main", sv.AsObjectReference(arr), "deref param");
        }
Пример #3
0
 public void TestParameterArrayObj()
 {
     var sv = new ValSimple("main", typeof(int[]));
     var p = Expression.Parameter(typeof(int[]), "main");
     var r = Expression.Constant(1);
     var arr = Expression.ArrayIndex(p, r);
     Assert.AreEqual("main", sv.AsObjectReference(arr), "deref param");
 }