Commit 1aaf1544 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Migration to Unified Xamarin.iOS

parent 9dc02291
...@@ -10,16 +10,19 @@ using NLuaTest; ...@@ -10,16 +10,19 @@ using NLuaTest;
namespace ConsoleTest namespace ConsoleTest
{ {
public class Program public class Program
{ {
static void Main (string [] args) static void Main (string [] args)
{ {
using (var l = new Lua ()) { using (var l = new Lua ()) {
Action c = () => { Console.WriteLine ("Ola"); }; l.LoadCLRPackage ();
l ["d"] = c; l.DoString (" import ('ConsoleTest') ");
l.DoString (" d () "); l.DoString (@"
p=parameter()
r1 = testClass2.read(p) -- is not working. it is also not working if the method in base class has two parameters instead of one
r2 = testClass2.read(1) -- is working
");
} }
} }
} }
......
Subproject commit eff38fd1739ef2738d912d6872a2d4315d07af21 Subproject commit e31a48301af5c69a05766477e5d8c19928514a13
Subproject commit 2f0dfdcc50acca3e88afa6ef5cc5ad97f142e57a Subproject commit 2c66160f82469cf9aa73feb4a834dc31aa1dbc85
This diff is collapsed.
...@@ -32,6 +32,7 @@ using System.Collections.Generic; ...@@ -32,6 +32,7 @@ using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using NLua.Method; using NLua.Method;
using NLua.Extensions; using NLua.Extensions;
using ObjCRuntime;
namespace NLua namespace NLua
{ {
...@@ -126,7 +127,7 @@ namespace NLua ...@@ -126,7 +127,7 @@ namespace NLua
* __call metafunction of CLR delegates, retrieves and calls the delegate. * __call metafunction of CLR delegates, retrieves and calls the delegate.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int RunFunctionDelegate (LuaState luaState) private static int RunFunctionDelegate (LuaState luaState)
{ {
...@@ -145,7 +146,7 @@ namespace NLua ...@@ -145,7 +146,7 @@ namespace NLua
* __gc metafunction of CLR objects. * __gc metafunction of CLR objects.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int CollectObject (LuaState luaState) private static int CollectObject (LuaState luaState)
{ {
...@@ -167,7 +168,7 @@ namespace NLua ...@@ -167,7 +168,7 @@ namespace NLua
* __tostring metafunction of CLR objects. * __tostring metafunction of CLR objects.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int ToStringLua (LuaState luaState) private static int ToStringLua (LuaState luaState)
{ {
...@@ -192,7 +193,7 @@ namespace NLua ...@@ -192,7 +193,7 @@ namespace NLua
* __add metafunction of CLR objects. * __add metafunction of CLR objects.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
static int AddLua (LuaState luaState) static int AddLua (LuaState luaState)
{ {
...@@ -204,7 +205,7 @@ namespace NLua ...@@ -204,7 +205,7 @@ namespace NLua
* __sub metafunction of CLR objects. * __sub metafunction of CLR objects.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
static int SubtractLua (LuaState luaState) static int SubtractLua (LuaState luaState)
{ {
...@@ -216,7 +217,7 @@ namespace NLua ...@@ -216,7 +217,7 @@ namespace NLua
* __mul metafunction of CLR objects. * __mul metafunction of CLR objects.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
static int MultiplyLua (LuaState luaState) static int MultiplyLua (LuaState luaState)
{ {
...@@ -228,7 +229,7 @@ namespace NLua ...@@ -228,7 +229,7 @@ namespace NLua
* __div metafunction of CLR objects. * __div metafunction of CLR objects.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
static int DivideLua (LuaState luaState) static int DivideLua (LuaState luaState)
{ {
...@@ -240,7 +241,7 @@ namespace NLua ...@@ -240,7 +241,7 @@ namespace NLua
* __mod metafunction of CLR objects. * __mod metafunction of CLR objects.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
static int ModLua (LuaState luaState) static int ModLua (LuaState luaState)
{ {
...@@ -252,7 +253,7 @@ namespace NLua ...@@ -252,7 +253,7 @@ namespace NLua
* __unm metafunction of CLR objects. * __unm metafunction of CLR objects.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
static int UnaryNegationLua (LuaState luaState) static int UnaryNegationLua (LuaState luaState)
{ {
...@@ -288,7 +289,7 @@ namespace NLua ...@@ -288,7 +289,7 @@ namespace NLua
* __eq metafunction of CLR objects. * __eq metafunction of CLR objects.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
static int EqualLua (LuaState luaState) static int EqualLua (LuaState luaState)
{ {
...@@ -300,7 +301,7 @@ namespace NLua ...@@ -300,7 +301,7 @@ namespace NLua
* __lt metafunction of CLR objects. * __lt metafunction of CLR objects.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
static int LessThanLua (LuaState luaState) static int LessThanLua (LuaState luaState)
{ {
...@@ -312,7 +313,7 @@ namespace NLua ...@@ -312,7 +313,7 @@ namespace NLua
* __le metafunction of CLR objects. * __le metafunction of CLR objects.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
static int LessThanOrEqualLua (LuaState luaState) static int LessThanOrEqualLua (LuaState luaState)
{ {
...@@ -365,7 +366,7 @@ namespace NLua ...@@ -365,7 +366,7 @@ namespace NLua
* If the member does not exist returns nil. * If the member does not exist returns nil.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int GetMethod (LuaState luaState) private static int GetMethod (LuaState luaState)
{ {
...@@ -474,7 +475,7 @@ namespace NLua ...@@ -474,7 +475,7 @@ namespace NLua
* Adds a prefix to the method name to call the base version of the method. * Adds a prefix to the method name to call the base version of the method.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int GetBaseMethod (LuaState luaState) private static int GetBaseMethod (LuaState luaState)
{ {
...@@ -764,7 +765,7 @@ namespace NLua ...@@ -764,7 +765,7 @@ namespace NLua
* and error if the assignment is invalid. * and error if the assignment is invalid.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int SetFieldOrProperty (LuaState luaState) private static int SetFieldOrProperty (LuaState luaState)
{ {
...@@ -946,7 +947,7 @@ namespace NLua ...@@ -946,7 +947,7 @@ namespace NLua
* __index metafunction of type references, works on static members. * __index metafunction of type references, works on static members.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int GetClassMethod (LuaState luaState) private static int GetClassMethod (LuaState luaState)
{ {
...@@ -987,7 +988,7 @@ namespace NLua ...@@ -987,7 +988,7 @@ namespace NLua
* __newindex function of type references, works on static members. * __newindex function of type references, works on static members.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int SetClassFieldOrProperty (LuaState luaState) private static int SetClassFieldOrProperty (LuaState luaState)
{ {
...@@ -1014,7 +1015,7 @@ namespace NLua ...@@ -1014,7 +1015,7 @@ namespace NLua
* __call metafunction of Delegates. * __call metafunction of Delegates.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
static int CallDelegate (LuaState luaState) static int CallDelegate (LuaState luaState)
{ {
...@@ -1068,7 +1069,7 @@ namespace NLua ...@@ -1068,7 +1069,7 @@ namespace NLua
* generates an exception. * generates an exception.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int CallConstructor (LuaState luaState) private static int CallConstructor (LuaState luaState)
{ {
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7064B157-DD57-4828-94C5-CA149B25CB40}</ProjectGuid> <ProjectGuid>{7064B157-DD57-4828-94C5-CA149B25CB40}</ProjectGuid>
<ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>NLua.iOS</RootNamespace> <RootNamespace>NLua.iOS</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>NLua.iOS</AssemblyName> <AssemblyName>NLua.iOS</AssemblyName>
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
...@@ -36,9 +36,8 @@ ...@@ -36,9 +36,8 @@
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="monotouch" /> <Reference Include="Xamarin.iOS" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets" />
<ItemGroup> <ItemGroup>
<Folder Include="GenerateEventAssembly\ios\" /> <Folder Include="GenerateEventAssembly\ios\" />
</ItemGroup> </ItemGroup>
...@@ -92,4 +91,5 @@ ...@@ -92,4 +91,5 @@
<Name>KeraLua.iOS</Name> <Name>KeraLua.iOS</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
...@@ -32,6 +32,7 @@ using System.Collections.Generic; ...@@ -32,6 +32,7 @@ using System.Collections.Generic;
using NLua.Method; using NLua.Method;
using NLua.Exceptions; using NLua.Exceptions;
using NLua.Extensions; using NLua.Extensions;
using ObjCRuntime;
namespace NLua namespace NLua
{ {
...@@ -259,7 +260,7 @@ namespace NLua ...@@ -259,7 +260,7 @@ namespace NLua
* if the assembly is not found. * if the assembly is not found.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int LoadAssembly (LuaState luaState) private static int LoadAssembly (LuaState luaState)
{ {
...@@ -346,7 +347,7 @@ namespace NLua ...@@ -346,7 +347,7 @@ namespace NLua
* type is not found. * type is not found.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int ImportType (LuaState luaState) private static int ImportType (LuaState luaState)
{ {
...@@ -373,7 +374,7 @@ namespace NLua ...@@ -373,7 +374,7 @@ namespace NLua
* type passed as second argument in the stack. * type passed as second argument in the stack.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int RegisterTable (LuaState luaState) private static int RegisterTable (LuaState luaState)
{ {
...@@ -424,7 +425,7 @@ namespace NLua ...@@ -424,7 +425,7 @@ namespace NLua
* base field, freeing the created object for garbage-collection * base field, freeing the created object for garbage-collection
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int UnregisterTable (LuaState luaState) private static int UnregisterTable (LuaState luaState)
{ {
...@@ -468,7 +469,7 @@ namespace NLua ...@@ -468,7 +469,7 @@ namespace NLua
* if no matching method is not found. * if no matching method is not found.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int GetMethodSignature (LuaState luaState) private static int GetMethodSignature (LuaState luaState)
{ {
...@@ -520,7 +521,7 @@ namespace NLua ...@@ -520,7 +521,7 @@ namespace NLua
* if no matching constructor is found. * if no matching constructor is found.
*/ */
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int GetConstructorSignature (LuaState luaState) private static int GetConstructorSignature (LuaState luaState)
{ {
...@@ -998,7 +999,7 @@ namespace NLua ...@@ -998,7 +999,7 @@ namespace NLua
} }
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int CType (LuaState luaState) private static int CType (LuaState luaState)
{ {
...@@ -1017,7 +1018,7 @@ namespace NLua ...@@ -1017,7 +1018,7 @@ namespace NLua
} }
#if MONOTOUCH #if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (LuaNativeFunction))] [MonoPInvokeCallback (typeof (LuaNativeFunction))]
#endif #endif
private static int EnumFromInt (LuaState luaState) private static int EnumFromInt (LuaState luaState)
{ {
......
This diff is collapsed.
...@@ -14,7 +14,7 @@ using NUnit.Framework; ...@@ -14,7 +14,7 @@ using NUnit.Framework;
#endif #endif
#if MONOTOUCH #if MONOTOUCH
using MonoTouch.Foundation; using Foundation;
using MonoTouch; using MonoTouch;
#endif #endif
......
...@@ -2,8 +2,8 @@ using System; ...@@ -2,8 +2,8 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using MonoTouch.Foundation; using Foundation;
using MonoTouch.UIKit; using UIKit;
namespace NLuaTestsiOS namespace NLuaTestsiOS
{ {
......
...@@ -4,11 +4,13 @@ ...@@ -4,11 +4,13 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform> <Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProjectGuid>{2DC0E43A-21B8-41FF-8793-60AB50350977}</ProjectGuid> <ProjectGuid>{2DC0E43A-21B8-41FF-8793-60AB50350977}</ProjectGuid>
<ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RootNamespace>NLuaTest</RootNamespace> <RootNamespace>NLuaTest</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>NLuaTest</AssemblyName> <AssemblyName>NLuaTest</AssemblyName>
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
...@@ -107,9 +109,9 @@ ...@@ -107,9 +109,9 @@
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="monotouch" />
<Reference Include="MonoTouch.NUnitLite" /> <Reference Include="MonoTouch.NUnitLite" />
<Reference Include="System.Numerics" /> <Reference Include="System.Numerics" />
<Reference Include="Xamarin.iOS" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<ItemGroup> <ItemGroup>
...@@ -138,7 +140,6 @@ ...@@ -138,7 +140,6 @@
<Link>LoadFileTests.cs</Link> <Link>LoadFileTests.cs</Link>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\Core\NLua\NLua.iOS.csproj"> <ProjectReference Include="..\..\Core\NLua\NLua.iOS.csproj">
......
...@@ -5,7 +5,7 @@ using NLua; ...@@ -5,7 +5,7 @@ using NLua;
using NLuaTest.Mock; using NLuaTest.Mock;
#if MONOTOUCH #if MONOTOUCH
using MonoTouch.Foundation; using Foundation;
using MonoTouch; using MonoTouch;
#endif #endif
...@@ -42,7 +42,7 @@ namespace NLuaTest ...@@ -42,7 +42,7 @@ namespace NLuaTest
using (Lua lua = new Lua ()) { using (Lua lua = new Lua ()) {
lua.LoadCLRPackage (); lua.LoadCLRPackage ();
lua.DoString ("import ('monotouch', 'MonoTouch.Foundation') "); lua.DoString ("import ('Xamarin.iOS', 'Foundation') ");
lua.DoString ("testURL = NSUrl('http://nlua.org/?query=param')"); lua.DoString ("testURL = NSUrl('http://nlua.org/?query=param')");
lua.DoString ("host = testURL.Host"); lua.DoString ("host = testURL.Host");
......
...@@ -2,8 +2,8 @@ using System; ...@@ -2,8 +2,8 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using MonoTouch.Foundation; using Foundation;
using MonoTouch.UIKit; using UIKit;
using MonoTouch.NUnit.UI; using MonoTouch.NUnit.UI;
namespace NLuaTestsiOS namespace NLuaTestsiOS
......
...@@ -2,20 +2,20 @@ ...@@ -2,20 +2,20 @@
using System; using System;
using NLua; using NLua;
using NLua.Exceptions; using NLua.Exceptions;
using System.IO; using System.IO;
#if WINDOWS_PHONE #if WINDOWS_PHONE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using SetUp = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestInitializeAttribute; using SetUp = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestInitializeAttribute;
using TearDown = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestCleanupAttribute; using TearDown = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestCleanupAttribute;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#else #else
using NUnit.Framework; using NUnit.Framework;
#endif #endif
#if MONOTOUCH #if MONOTOUCH
using MonoTouch.Foundation; using Foundation;
#endif #endif
namespace NLuaTest namespace NLuaTest
...@@ -48,8 +48,8 @@ namespace NLuaTest ...@@ -48,8 +48,8 @@ namespace NLuaTest
[SetUp] [SetUp]
public void Setup() public void Setup()
{ {
lua = new Lua (); lua = new Lua ();
lua.RegisterFunction ("WriteLineString", typeof (Console).GetMethod ("WriteLine", new Type [] { typeof (String) })); lua.RegisterFunction ("WriteLineString", typeof (Console).GetMethod ("WriteLine", new Type [] { typeof (String) }));
lua.DoString (@" lua.DoString (@"
function print (param) function print (param)
...@@ -77,7 +77,7 @@ namespace NLuaTest ...@@ -77,7 +77,7 @@ namespace NLuaTest
TestLuaFile ("cf"); TestLuaFile ("cf");
} }
[Test] [Test]
[Ignore] [Ignore]
public void Env () public void Env ()
{ {
...@@ -108,7 +108,7 @@ namespace NLuaTest ...@@ -108,7 +108,7 @@ namespace NLuaTest
TestLuaFile ("printf"); TestLuaFile ("printf");
} }
[Test] [Test]
[Ignore] [Ignore]
public void ReadOnly () public void ReadOnly ()
{ {
......
...@@ -7,7 +7,7 @@ using System.Threading; ...@@ -7,7 +7,7 @@ using System.Threading;
using NLua; using NLua;
using NLua.Exceptions; using NLua.Exceptions;
#if MONOTOUCH #if MONOTOUCH
using MonoTouch.Foundation; using Foundation;
#endif #endif
#if WINDOWS_PHONE #if WINDOWS_PHONE
......
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