Commit 4aafb587 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Disable Linking (fix NSUrl test)

Added string property test.
parent 25f6cbf2
...@@ -34,11 +34,11 @@ namespace NLua.Config ...@@ -34,11 +34,11 @@ namespace NLua.Config
#else #else
public const string NLuaConfiguration = "Release"; public const string NLuaConfiguration = "Release";
#endif #endif
public const string NLuaCompany = "NLua Productions"; public const string NLuaCompany = "NLua.org";
public const string NLuaProduct = "NLua"; public const string NLuaProduct = "NLua";
public const string NLuaCopyright = "Copyright 2003-2008 Fabio Mascarenhas, Kevin Hesterm ,Megax and Vinicius Jarina"; public const string NLuaCopyright = "Copyright 2003-2013 Vinicius Jarina , Fabio Mascarenhas, Kevin Hesterm and Megax";
public const string NLuaTrademark = "MIT license"; public const string NLuaTrademark = "MIT license";
public const string NLuaVersion = "2.0.4"; public const string NLuaVersion = "1.0.0";
public const string NLuaFileVersion = "2.0.4.0"; public const string NLuaFileVersion = "1.0.0.0";
} }
} }
\ No newline at end of file
...@@ -344,7 +344,7 @@ namespace NLua ...@@ -344,7 +344,7 @@ namespace NLua
return true; return true;
//CP: Removed NonPublic binding search //CP: Removed NonPublic binding search
var members = objType.GetMember (methodName, BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase/* | BindingFlags.NonPublic*/); var members = objType.GetMember (methodName, BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase);
return (members.Length > 0); return (members.Length > 0);
} }
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
<MtouchUseSGen>True</MtouchUseSGen> <MtouchUseSGen>True</MtouchUseSGen>
<MtouchUseRefCounting>True</MtouchUseRefCounting> <MtouchUseRefCounting>True</MtouchUseRefCounting>
<DefineConstants>MONOTOUCH</DefineConstants> <DefineConstants>MONOTOUCH</DefineConstants>
<MtouchLink>None</MtouchLink>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
...@@ -71,6 +72,7 @@ ...@@ -71,6 +72,7 @@
<MtouchUseLlvm>True</MtouchUseLlvm> <MtouchUseLlvm>True</MtouchUseLlvm>
<MtouchUseSGen>True</MtouchUseSGen> <MtouchUseSGen>True</MtouchUseSGen>
<MtouchUseRefCounting>True</MtouchUseRefCounting> <MtouchUseRefCounting>True</MtouchUseRefCounting>
<MtouchLink>None</MtouchLink>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
<DebugType>none</DebugType> <DebugType>none</DebugType>
......
...@@ -900,6 +900,23 @@ namespace NLuaTest ...@@ -900,6 +900,23 @@ namespace NLuaTest
//Console.WriteLine("new val (from Lua)="+t1.testval); //Console.WriteLine("new val (from Lua)="+t1.testval);
} }
} }
[Test]
public void AccessObjectStringProperty ()
{
using (Lua lua = new Lua ()) {
TestClass t1 = new TestClass ();
t1.teststrval = "This is a string test";
lua ["netobj"] = t1;
lua.DoString ("var=netobj.teststrval");
string var = (string)lua ["var"];
Assert.AreEqual ("This is a string test", var);
lua.DoString ("netobj.teststrval='Another String'");
Assert.AreEqual ("Another String", t1.teststrval);
//Console.WriteLine("new val (from Lua)="+t1.testval);
}
}
/* /*
* Tests calling of an object's method with no overloads * Tests calling of an object's method with no overloads
*/ */
......
...@@ -345,6 +345,15 @@ namespace NLuaTest.Mock ...@@ -345,6 +345,15 @@ namespace NLuaTest.Mock
} }
} }
public string teststrval {
get {
return this.strVal;
}
set {
this.strVal = value;
}
}
public int this [int index] { public int this [int index] {
get { return 1; } get { return 1; }
set { } set { }
......
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