Commit 3fef9df1 authored by Mike Schurman's avatar Mike Schurman
Browse files

Structures that hash to the same value are sharing values.

I added a unit test "TestStructHashesEqual" that is currently failing, so
that someone can investigate.
parent e6a0b123
......@@ -119,6 +119,20 @@ namespace NLuaTest
}
}
[Test]
public void TestStructHashesEqual()
{
using (Lua lua = new Lua())
{
lua.DoString("luanet.load_assembly('NLuaTest')");
lua.DoString("TestStruct=luanet.import_type('NLuaTest.Mock.TestStruct')");
lua.DoString("struct1=TestStruct(0)");
lua.DoString("struct2=TestStruct(0)");
lua.DoString("struct2.val=1");
Assert.AreEqual(0, (double)lua["struct1.val"]);
}
}
[Test]
public void TestMethodOverloads ()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment