Commit 4c205878 authored by Isaac Brodsky's avatar Isaac Brodsky
Browse files

Correct asserts & fix types on README.md

parent 6b8eeedc
...@@ -201,9 +201,9 @@ You can get (or set) any property using `.` notation from Lua. ...@@ -201,9 +201,9 @@ You can get (or set) any property using `.` notation from Lua.
All methods, events or property need to be public available, NLua will fail to call non-public members. All methods, events or property need to be public available, NLua will fail to call non-public members.
If you are using Xamarin.iOS you need to [`Preserve`](http://developer.xamarin.com/guides/ios/advanced_topics/linker/) the class you wan't use inside NLua, otherwise the Linker will remove the class from final binary if the class is not in use. If you are using Xamarin.iOS you need to [`Preserve`](http://developer.xamarin.com/guides/ios/advanced_topics/linker/) the class you want to use inside NLua, otherwise the Linker will remove the class from final binary if the class is not in use.
##Sendboxing## ##Sandboxing##
There is many ways to sandbox scripts inside your application. I strongly recomend you to use plain Lua to do your sandbox. There is many ways to sandbox scripts inside your application. I strongly recomend you to use plain Lua to do your sandbox.
You can re-write the `import` function before load the user script and if the user try to import a .NET assembly nothing will happen. You can re-write the `import` function before load the user script and if the user try to import a .NET assembly nothing will happen.
......
...@@ -238,8 +238,8 @@ namespace NLuaTest ...@@ -238,8 +238,8 @@ namespace NLuaTest
lua.DoString("TestEnum=luanet.import_type('NLuaTest.Mock.TestEnum')"); lua.DoString("TestEnum=luanet.import_type('NLuaTest.Mock.TestEnum')");
lua.DoString("enum1=TestEnum.ValueA"); lua.DoString("enum1=TestEnum.ValueA");
lua.DoString("enum2=TestEnum.ValueB"); lua.DoString("enum2=TestEnum.ValueB");
Assert.AreEqual(true, (bool)lua.DoString("enum1==enum2")[0]); Assert.AreEqual(true, (bool)lua.DoString("return enum1==enum2")[0]);
Assert.AreEqual(false, (bool)lua.DoString("enum1!=enum2")[0]); Assert.AreEqual(false, (bool)lua.DoString("return enum1!=enum2")[0]);
} }
} }
......
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