Commit 85d86564 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Merge pull request #85 from MikeSchurman/master

Structures that hash to the same value are sharing values.
parents 81d6d81b 3fef9df1
...@@ -119,6 +119,20 @@ namespace NLuaTest ...@@ -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] [Test]
public void TestMethodOverloads () 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