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)); } }
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)); }
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 })); }