Esempio n. 1
0
 public void InOutTest(CodeObject co, object[][] ins, Dictionary <string, object>[] keywordsIn, object[][] outs)
 {
     for (int i = 0; i < ins.Length; ++i)
     {
         var outParams = ArgParamMatcher.Resolve(co, ins[i], keywordsIn[i]);
         Assert.That(outParams, Is.EqualTo(outs[i]), "Failed Test #" + (i + 1));
     }
 }
Esempio n. 2
0
        public void OneToOne()
        {
            var co = new CodeObject(new byte[0]);

            co.ArgCount = 1;
            co.Defaults = new List <object>();
            co.VarNames.Add("onevar");

            var inParams  = new object[1];
            var outParams = ArgParamMatcher.Resolve(co, inParams);

            Assert.That(outParams, Is.EqualTo(inParams));
        }
Esempio n. 3
0
        public void OneDefault()
        {
            var co = new CodeObject(new byte[0]);

            co.ArgCount = 1;
            co.Defaults = new List <object>();
            co.Defaults.Add(-1);
            co.VarNames.Add("has_default");

            var inParams  = new object[0];
            var outParams = ArgParamMatcher.Resolve(co, inParams);

            Assert.That(outParams, Is.EqualTo(new object[] { -1 }));
        }