Fixes for function execution when parameter is not bound
This commit is contained in:
@@ -43,6 +43,16 @@ namespace UpsilonTests.GeneralTests
|
||||
return a + b;
|
||||
}
|
||||
|
||||
public bool OverloadMethod(string s)
|
||||
{
|
||||
return s == "test";
|
||||
}
|
||||
|
||||
public int OverloadMethod(int i)
|
||||
{
|
||||
return i + 10;
|
||||
}
|
||||
|
||||
}
|
||||
#pragma warning restore 414, 649
|
||||
|
||||
@@ -136,6 +146,20 @@ end
|
||||
Assert.False(obj.PrivateSet);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OverloadMethods()
|
||||
{
|
||||
var obj = new UserDataHelper();
|
||||
const string input = @"
|
||||
function test(o)
|
||||
return o.overloadMethod(""test"") and o.OverloadMethod(10) == 20
|
||||
end
|
||||
";
|
||||
Assert.True(Executor.EvaluateFunction<bool>(input, "test", new[] {obj}, Options));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public UserDataTests(StaticScriptFixture fix) : base(fix)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user