"packages/KeraLua.1.0.2/lib/vscode:/vscode.git/clone" did not exist on "64a6b5c78e6d0e2df570234bf83dde0bb4930daf"
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
......@@ -117,6 +117,20 @@ namespace NLuaTest
lua.DoString ("val=test.Struct.val");
Assert.AreEqual (2.0d, (double)lua ["val"]);
}
}
[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]
......
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