Skip to content

Commit

Permalink
Version 0.9.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xanathar committed Jul 9, 2015
1 parent 62a70e1 commit a638e6a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
18 changes: 18 additions & 0 deletions src/MoonSharp.Interpreter.Tests/EndToEnd/SimpleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Generic;
using MoonSharp.Interpreter.Execution;
using NUnit.Framework;
using MoonSharp.Interpreter.Loaders;

namespace MoonSharp.Interpreter.Tests
{
Expand Down Expand Up @@ -1474,5 +1475,22 @@ function test(a)
");
}

// [Test]
// public void TestModulesLoadingWithoutCrash()
// {
//#if !PCL
// var basePath = AppDomain.CurrentDomain.BaseDirectory;
// var scriptPath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "scripts\\test");
// Script script = new Script();

// ((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new[]
// {
// System.IO.Path.Combine(basePath, "scripts\\test\\test.lua"),
// };
// var obj = script.LoadFile(System.IO.Path.Combine(scriptPath, "test.lua"));
// obj.Function.Call();
//#endif
// }

}
}
21 changes: 21 additions & 0 deletions src/MoonSharp.Interpreter.Tests/EndToEnd/UserDataOverloadsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,27 @@ private void RunTestOverload(string code, string expected, bool tupleExpected =
}


[Test]
public void Interop_OutParamInOverloadResolution()
{
UserData.RegisterType<Dictionary<int, int>>();
UserData.RegisterExtensionType(typeof(OverloadsExtMethods));

try
{
var lua = new Script();
lua.Globals["DictionaryIntInt"] = typeof(Dictionary<int, int>);

var script = @"local dict = DictionaryIntInt.__new(); local res, v = dict.TryGetValue(0)";
lua.DoString(script);
lua.DoString(script);
}
finally
{
UserData.UnregisterType<Dictionary<int, int>>();
}
}

[Test]
public void Interop_Overloads_Varargs1()
{
Expand Down
2 changes: 1 addition & 1 deletion src/MoonSharp.Interpreter/CoreLib/OsTimeModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private static string StrFTime(string format, DateTime d)
{ 'A', "dddd" },
{ 'b', "MMM" },
{ 'B', "MMMM" },
{ 'c', "%f" },
{ 'c', "f" },
{ 'd', "dd" },
{ 'D', "MM/dd/yy" },
{ 'F', "yyyy-MM-dd" },
Expand Down
2 changes: 1 addition & 1 deletion src/MoonSharp.Interpreter/Script.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class Script : IScriptPrivateResource
/// <summary>
/// The version of the MoonSharp engine
/// </summary>
public const string VERSION = "0.9.7.1";
public const string VERSION = "0.9.8.0";

/// <summary>
/// The Lua version being supported
Expand Down

0 comments on commit a638e6a

Please sign in to comment.