Unverified Commit 1cc74393 authored by Vinicius Jarina's avatar Vinicius Jarina Committed by GitHub
Browse files

* Giant cleanup/reshuffle of all files. (#265)

* * Giant cleanup/reshuffle of all files.

* * Update upstream `KeraLua` to `0.1.14`

* Fixed .NET Core build.

* Add runsettings file

* * Fixed nuspec `dependencies` node

* Ignore _ in branch names for package names.

* * Fixed nuspec.
parent 3f254585

namespace NLuaTest
{
/// <summary>
/// Provides access to string resources.
/// </summary>
public class LocalizedStrings
{
}
}
\ No newline at end of file
<phone:PhoneApplicationPage
x:Class="TestApp1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- LOCALIZATION NOTE:
To localize the displayed strings copy their values to appropriately named
keys in the app's neutral language resource file (AppResources.resx) then
replace the hard-coded text value between the attributes' quotation marks
with the binding clause whose path points to that string name.
For example:
Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"
This binding points to the template's string resource named "ApplicationTitle".
Adding supported languages in the Project Properties tab will create a
new resx file per language that can carry the translated values of your
UI strings. The binding in these examples will cause the value of the
attributes to be drawn from the .resx file that matches the
CurrentUICulture of the app at run time.
-->
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="TEST APP" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
<TextBlock Text="Unit Test" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<TextBlock x:Name="label" Text="Tests running" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
<!--Uncomment to see an alignment grid to help ensure your controls are
aligned on common boundaries. The image has a top margin of -32px to
account for the System Tray. Set this to 0 (or remove the margin altogether)
if the System Tray is hidden.
Before shipping remove this XAML and the image itself.-->
<!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->
</Grid>
</phone:PhoneApplicationPage>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System.Threading;
using Microsoft.VisualStudio.TestPlatform.Core;
using vstest_executionengine_platformbridge;
using Microsoft.VisualStudio.TestPlatform.TestExecutor;
using System.Reflection;
namespace NLuaTest
{
public partial class MainPage : PhoneApplicationPage
{
// Constructor
public MainPage()
{
// InitializeComponent();
var wrapper = new TestExecutorServiceWrapper();
new Thread(new ServiceMain((param0, param1) => wrapper.SendMessage((ContractName)param0, param1)).Run).Start();
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0AF57940-43F8-492B-9684-0369259C990B}</ProjectGuid>
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLuaTest</RootNamespace>
<AssemblyName>NLuaTest</AssemblyName>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<SilverlightApplication>true</SilverlightApplication>
<WPTestProject>true</WPTestProject>
<SupportedCultures>
</SupportedCultures>
<XapOutputs>true</XapOutputs>
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
<XapFilename>TestApp1_$(Configuration)_$(Platform).xap</XapFilename>
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
<SilverlightAppEntry>TestApp1.App</SilverlightAppEntry>
<ValidateXaml>false</ValidateXaml>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\x86\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\x86\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\ARM\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\ARM\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\NLuaTest\LoadFileTests.cs">
<Link>LoadFileTests.cs</Link>
</Compile>
<Compile Include="..\tests\Core.cs">
<Link>Core.cs</Link>
</Compile>
<Compile Include="..\tests\Entity.cs">
<Link>Entity.cs</Link>
</Compile>
<Compile Include="..\tests\LuaTests.cs">
<Link>LuaTests.cs</Link>
</Compile>
<Compile Include="..\tests\TestLua.cs">
<Link>TestLua.cs</Link>
</Compile>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="LocalizedStrings.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Content Include="..\tests\test.lua">
<Link>Resources\test.lua</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Properties\AppManifest.xml" />
<None Include="Properties\WMAppManifest.xml">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Assets\AlignmentGrid.png" />
<Content Include="Assets\ApplicationIcon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\FlipCycleTileMedium.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\FlipCycleTileSmall.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\KeraLua\external\lua\wp8_build\lua\lua52\lua52.vcxproj">
<Project>{ABD36435-56AD-4940-B51A-10AEECA46C01}</Project>
<Name>lua52</Name>
</ProjectReference>
<ProjectReference Include="..\Core\KeraLua\src\WP8\KeraLua.WP8.csproj">
<Project>{2C343545-0778-49BB-9665-1FA656013466}</Project>
<Name>KeraLua.WP8</Name>
</ProjectReference>
<ProjectReference Include="..\Core\NLua\NLua.WP8.csproj">
<Project>{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}</Project>
<Name>NLua.WP8</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<SDKReference Include="MSTestFramework, Version=11.0">
<Name>MSTest for Managed Projects</Name>
</SDKReference>
<SDKReference Include="TestPlatform, Version=11.0">
<Name>Microsoft Visual Studio Windows Phone Test Core</Name>
</SDKReference>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ProjectExtensions />
</Project>
\ No newline at end of file
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Deployment.Parts>
</Deployment.Parts>
</Deployment>
<?xml version="1.0" encoding="utf-8"?>
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
<DefaultLanguage xmlns="" code="en-US"/>
<App xmlns="" ProductID="{0af57940-43f8-492b-9684-0369259c990b}" Title="TestApp1" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="TestApp1 author" Description="Sample description" Publisher="TestApp1" PublisherID="{6662bc62-7649-418b-a0ac-acc2f917ead4}">
<IconPath IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</IconPath>
<Capabilities>
<Capability Name="ID_CAP_NETWORKING"/>
<Capability Name="ID_CAP_MEDIALIB_AUDIO"/>
<Capability Name="ID_CAP_MEDIALIB_PLAYBACK"/>
<Capability Name="ID_CAP_SENSORS"/>
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/>
</Capabilities>
<Tasks>
<DefaultTask Name ="_default" NavigationPage="MainPage.xaml"/>
</Tasks>
<Tokens>
<PrimaryToken TokenID="TestApp1Token" TaskName="_default">
<TemplateFlip>
<SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileSmall.png</SmallImageURI>
<Count>0</Count>
<BackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</BackgroundImageURI>
<Title>TestApp1</Title>
<BackContent></BackContent>
<BackBackgroundImageURI></BackBackgroundImageURI>
<BackTitle></BackTitle>
<DeviceLockImageURI></DeviceLockImageURI>
<HasLarge></HasLarge>
</TemplateFlip>
</PrimaryToken>
</Tokens>
<ActivatableClasses>
<InProcessServer>
<Path>vstest_executionengine_platformbridge.dll</Path>
<ActivatableClass ActivatableClassId="vstest_executionengine_platformbridge.ServiceMain" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="vstest_executionengine_platformbridge.MessageTransmitter" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="vstest_executionengine_platformbridge.NativeMethods" ThreadingModel="both" />
</InProcessServer>
</ActivatableClasses>
<ScreenResolutions>
<ScreenResolution Name="ID_RESOLUTION_WVGA"/>
<ScreenResolution Name="ID_RESOLUTION_WXGA"/>
<ScreenResolution Name="ID_RESOLUTION_HD720P"/>
</ScreenResolutions>
</App>
</Deployment>
\ No newline at end of file
using System;
using System.Text;
using System.Collections.Generic;
using NUnit.Framework;
using NLuaTest.Mock;
using System.Reflection;
using System.Threading;
using NLua;
using NLua.Exceptions;
namespace NLuaTest
{
[TestFixture]
public class AAACodeGenTests
{
/*
* Tests passing a Lua function to a delegate
* with value-type arguments
*/
[Test]
public void LuaDelegateValueTypes ()
{
using (Lua lua = new Lua ()) {
lua.DoString ("luanet.load_assembly('NLuaTest')");
lua.DoString ("TestClass=luanet.import_type('NLuaTest.Mock.TestClass')");
lua.DoString ("test=TestClass()");
lua.DoString ("function func(x,y) return x+y; end");
lua.DoString ("test=TestClass()");
lua.DoString ("a=test:callDelegate1(func)");
int a = (int)lua.GetNumber ("a");
Assert.AreEqual (5, a);
//Console.WriteLine("delegate returned: "+a);
}
}
/*
* Tests passing a Lua function to a delegate
* with value-type arguments and out params
*/
[Test]
public void LuaDelegateValueTypesOutParam ()
{
using (Lua lua = new Lua ()) {
lua.DoString ("luanet.load_assembly('NLuaTest')");
lua.DoString ("TestClass=luanet.import_type('NLuaTest.Mock.TestClass')");
lua.DoString ("test=TestClass()");
lua.DoString ("function func(x) return x,x*2; end");
lua.DoString ("test=TestClass()");
lua.DoString ("a=test:callDelegate2(func)");
int a = (int)lua.GetNumber ("a");
Assert.AreEqual (6, a);
//Console.WriteLine("delegate returned: "+a);
}
}
/*
* Tests passing a Lua function to a delegate
* with value-type arguments and ref params
*/
[Test]
public void LuaDelegateValueTypesByRefParam ()
{
using (Lua lua = new Lua ()) {
lua.DoString ("luanet.load_assembly('NLuaTest')");
lua.DoString ("TestClass=luanet.import_type('NLuaTest.Mock.TestClass')");
lua.DoString ("test=TestClass()");
lua.DoString ("function func(x,y) return x+y; end");
lua.DoString ("test=TestClass()");
lua.DoString ("a=test:callDelegate3(func)");
int a = (int)lua.GetNumber ("a");
Assert.AreEqual (5, a);
//Console.WriteLine("delegate returned: "+a);
}
}
/*
* Tests passing a Lua function to a delegate
* with value-type arguments that returns a reference type
*/
[Test]
public void LuaDelegateValueTypesReturnReferenceType ()
{
using (Lua lua = new Lua ()) {
lua.DoString ("luanet.load_assembly('NLuaTest')");
lua.DoString ("TestClass=luanet.import_type('NLuaTest.Mock.TestClass')");
lua.DoString ("test=TestClass()");
lua.DoString ("function func(x,y) return TestClass(x+y); end");
lua.DoString ("test=TestClass()");
lua.DoString ("a=test:callDelegate4(func)");
int a = (int)lua.GetNumber ("a");
Assert.AreEqual (5, a);
//Console.WriteLine("delegate returned: "+a);
}
}
/*
* Tests passing a Lua function to a delegate
* with reference type arguments
*/
[Test]
public void LuaDelegateReferenceTypes ()
{
using (Lua lua = new Lua ()) {
lua.DoString ("luanet.load_assembly('NLuaTest')");
lua.DoString ("TestClass=luanet.import_type('NLuaTest.Mock.TestClass')");
lua.DoString ("test=TestClass()");
lua.DoString ("function func(x,y) return x.testval+y.testval; end");
lua.DoString ("a=test:callDelegate5(func)");
int a = (int)lua.GetNumber ("a");
Assert.AreEqual (5, a);
//Console.WriteLine("delegate returned: "+a);
}
}
/*
* Tests passing a Lua function to a delegate
* with reference type arguments and an out param
*/
[Test]
public void LuaDelegateReferenceTypesOutParam ()
{
using (Lua lua = new Lua ()) {
lua.DoString ("luanet.load_assembly('NLuaTest')");
lua.DoString ("TestClass=luanet.import_type('NLuaTest.Mock.TestClass')");
lua.DoString ("test=TestClass()");
lua.DoString ("function func(x) return x,TestClass(x*2); end");
lua.DoString ("test=TestClass()");
lua.DoString ("a=test:callDelegate6(func)");
int a = (int)lua.GetNumber ("a");
Assert.AreEqual (6, a);
//Console.WriteLine("delegate returned: "+a);
}
}
/*
* Tests passing a Lua function to a delegate
* with reference type arguments and a ref param
*/
[Test]
public void LuaDelegateReferenceTypesByRefParam ()
{
using (Lua lua = new Lua ()) {
lua.DoString ("luanet.load_assembly('NLuaTest')");
lua.DoString ("TestClass=luanet.import_type('NLuaTest.Mock.TestClass')");
lua.DoString ("test=TestClass()");
lua.DoString ("function func(x,y) return TestClass(x+y.testval); end");
lua.DoString ("a=test:callDelegate7(func)");
int a = (int)lua.GetNumber ("a");
Assert.AreEqual (5, a);
//Console.WriteLine("delegate returned: "+a);
}
}
/*
* Tests passing a Lua table as an interface and
* calling one of its methods with value-type params
*/
[Test]
public void NLuaAAValueTypes ()
{
using (Lua lua = new Lua ()) {
lua.DoString ("luanet.load_assembly('NLuaTest')");
lua.DoString ("TestClass=luanet.import_type('NLuaTest.Mock.TestClass')");
lua.DoString ("test=TestClass()");
lua.DoString ("itest={}");
lua.DoString ("function itest:test1(x,y) return x+y; end");
lua.DoString ("test=TestClass()");
lua.DoString ("a=test:callInterface1(itest)");
int a = (int)lua.GetNumber ("a");
Assert.AreEqual (5, a);
//Console.WriteLine("interface returned: "+a);
}
}
/*
* Tests making an object from a Lua table and calling the base
* class version of one of the methods the table overrides.
*/
[Test]
public void LuaTableBaseMethod ()
{
using (Lua lua = new Lua ()) {
lua.DoString ("luanet.load_assembly('NLuaTest')");
lua.DoString ("TestClass=luanet.import_type('NLuaTest.Mock.TestClass')");
lua.DoString ("test={}");
lua.DoString ("function test:overridableMethod(x,y) print(self[base]); return 6 end");
lua.DoString ("luanet.make_object(test,'NLuaTest.Mock.TestClass')");
lua.DoString ("a=TestClass.callOverridable(test,2,3)");
int a = (int)lua.GetNumber ("a");
lua.DoString ("luanet.free_object(test)");
Assert.AreEqual (6, a);
}
}
}
}
using System;
using NLua;
using NLuaTest.Mock;
#if WINDOWS_PHONE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using SetUp = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestInitializeAttribute;
using TearDown = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestCleanupAttribute;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#else
using NUnit.Framework;
#endif
#if MONOTOUCH
using Foundation;
using MonoTouch;
#endif
namespace LoadFileTests
{
[TestFixture]
#if MONOTOUCH
[Preserve (AllMembers = true)]
#endif
public class LoadLuaFile
{
/*
* Tests capturing an exception
*/
[Test]
public void TestLoadFile ()
{
using (Lua lua = new Lua ()) {
lua.LoadCLRPackage ();
lua.DoFile ("test.lua");
int width = (int)(double)lua ["width"];
int height = (int)(double)lua ["height"];
string message = (string)lua ["message"];
int color_g = (int)(double)lua ["color.g"];
LuaFunction func = (LuaFunction)lua ["func"];
object[] res = func.Call (12, 34);
int x = (int)(double)res [0];
int y = (int)(double)res [1];
//function func(x,y)
// return x,x+y
//end
Assert.AreEqual (100, width);
Assert.AreEqual (200, height);
Assert.AreEqual ("Hello World!", message);
Assert.AreEqual (20, color_g);
Assert.AreEqual (12, x);
Assert.AreEqual (46, y);
}
}
[Test]
public void TestBinaryLoadFile ()
{
using (Lua lua = new Lua ()) {
lua.LoadCLRPackage ();
if (IntPtr.Size == 4)
lua.DoFile ("test_32.luac");
else
lua.DoFile ("test_64.luac");
int width = (int)(double)lua ["width"];
int height = (int)(double)lua ["height"];
string message = (string)lua ["message"];
int color_g = (int)(double)lua ["color.g"];
LuaFunction func = (LuaFunction)lua ["func"];
object[] res = func.Call (12, 34);
int x = (int)(double)res [0];
int y = (int)(double)res [1];
//function func(x,y)
// return x,x+y
//end
Assert.AreEqual (100, width);
Assert.AreEqual (200, height);
Assert.AreEqual ("Hello World!", message);
Assert.AreEqual (20, color_g);
Assert.AreEqual (12, x);
Assert.AreEqual (46, y);
}
}
}
}
EXTRA_DIST =
# Warning: This is an automatically generated file, do not edit!
if ENABLE_DEBUG
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
ASSEMBLY = ../tests/NLuaTest.dll
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = library
PROJECT_REFERENCES = \
../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll \
../Core/KopiLua/Bin/Debug/net40/KopiLua.dll \
../Run/Debug/net40/NLua.dll
BUILD_DIR = ../tests/
NLUATEST_DLL_MDB_SOURCE=../tests/NLuaTest.dll.mdb
NLUATEST_DLL_MDB=$(BUILD_DIR)/NLuaTest.dll.mdb
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../Core/KopiLua/Bin/Debug/net40/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../Core/KopiLua/Bin/Debug/net40/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
NLUA_DLL_SOURCE=../Run/Debug/net40/NLua.dll
NLUA_DLL_MDB_SOURCE=../Run/Debug/net40/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
endif
if ENABLE_DEBUGKOPILUA
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
ASSEMBLY = bin/DebugKopiLua/NLuaTest.dll
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = library
PROJECT_REFERENCES = \
../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll \
../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll \
../Core/NLua/bin/DebugKopiLua/NLua.dll
BUILD_DIR = bin/DebugKopiLua/
NLUATEST_DLL_MDB_SOURCE=bin/DebugKopiLua/NLuaTest.dll.mdb
NLUATEST_DLL_MDB=$(BUILD_DIR)/NLuaTest.dll.mdb
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
NLUA_DLL_SOURCE=../Core/NLua/bin/DebugKopiLua/NLua.dll
NLUA_DLL_MDB_SOURCE=../Core/NLua/bin/DebugKopiLua/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
endif
if ENABLE_RELEASE
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ "-define:TRACE"
ASSEMBLY = ../tests/NLuaTest.dll
ASSEMBLY_MDB =
COMPILE_TARGET = library
PROJECT_REFERENCES = \
../Core/KeraLua/src/bin/Release/net40/KeraLua.dll \
../Core/KopiLua/Bin/Release/net40/KopiLua.dll \
../Run/Release/net40/NLua.dll
BUILD_DIR = ../tests/
NLUATEST_DLL_MDB=
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/Release/net40/KeraLua.dll
KERALUA_DLL_MDB=
KOPILUA_DLL_SOURCE=../Core/KopiLua/Bin/Release/net40/KopiLua.dll
KOPILUA_DLL_MDB=
NLUA_DLL_SOURCE=../Run/Release/net40/NLua.dll
NLUA_DLL_MDB=
endif
if ENABLE_RELEASEKOPILUA
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ "-define:USE_KOPILUA"
ASSEMBLY = ../tests/NLuaTest.dll
ASSEMBLY_MDB =
COMPILE_TARGET = library
PROJECT_REFERENCES = \
../Core/KeraLua/src/bin/ReleaseKopiLua/KeraLua.dll \
../Core/KopiLua/KopiLua/bin/ReleaseKopiLua/KopiLua.dll \
../Core/NLua/bin/ReleaseKopiLua/NLua.dll
BUILD_DIR = ../tests/
NLUATEST_DLL_MDB=
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/ReleaseKopiLua/KeraLua.dll
KERALUA_DLL_MDB=
KOPILUA_DLL_SOURCE=../Core/KopiLua/KopiLua/bin/ReleaseKopiLua/KopiLua.dll
KOPILUA_DLL_MDB=
NLUA_DLL_SOURCE=../Core/NLua/bin/ReleaseKopiLua/NLua.dll
NLUA_DLL_MDB=
endif
if ENABLE_DEBUG_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
ASSEMBLY = ../tests/NLuaTest.dll
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = library
PROJECT_REFERENCES = \
../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll \
../Core/KopiLua/Bin/Debug/net40/KopiLua.dll \
../Run/Debug/net40/NLua.dll
BUILD_DIR = ../tests/
NLUATEST_DLL_MDB_SOURCE=../tests/NLuaTest.dll.mdb
NLUATEST_DLL_MDB=$(BUILD_DIR)/NLuaTest.dll.mdb
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../Core/KeraLua/src/bin/Debug/net40/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../Core/KopiLua/Bin/Debug/net40/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../Core/KopiLua/Bin/Debug/net40/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
NLUA_DLL_SOURCE=../Run/Debug/net40/NLua.dll
NLUA_DLL_MDB_SOURCE=../Run/Debug/net40/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
endif
if ENABLE_RELEASE_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ "-define:TRACE"
ASSEMBLY = ../tests/NLuaTest.dll
ASSEMBLY_MDB =
COMPILE_TARGET = library
PROJECT_REFERENCES = \
../Core/KeraLua/src/bin/Release/net40/KeraLua.dll \
../Core/KopiLua/Bin/Release/net40/KopiLua.dll \
../Run/Release/net40/NLua.dll
BUILD_DIR = ../tests/
NLUATEST_DLL_MDB=
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/Release/net40/KeraLua.dll
KERALUA_DLL_MDB=
KOPILUA_DLL_SOURCE=../Core/KopiLua/Bin/Release/net40/KopiLua.dll
KOPILUA_DLL_MDB=
NLUA_DLL_SOURCE=../Run/Release/net40/NLua.dll
NLUA_DLL_MDB=
endif
if ENABLE_DEBUGKOPILUA_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
ASSEMBLY = bin/DebugKopiLua/NLuaTest.dll
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = library
PROJECT_REFERENCES = \
../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll \
../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll \
../Core/NLua/bin/DebugKopiLua/NLua.dll
BUILD_DIR = bin/DebugKopiLua/
NLUATEST_DLL_MDB_SOURCE=bin/DebugKopiLua/NLuaTest.dll.mdb
NLUATEST_DLL_MDB=$(BUILD_DIR)/NLuaTest.dll.mdb
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll
KERALUA_DLL_MDB_SOURCE=../Core/KeraLua/src/bin/DebugKopiLua/KeraLua.dll.mdb
KERALUA_DLL_MDB=$(BUILD_DIR)/KeraLua.dll.mdb
KOPILUA_DLL_SOURCE=../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll
KOPILUA_DLL_MDB_SOURCE=../Core/KopiLua/KopiLua/bin/DebugKopiLua/KopiLua.dll.mdb
KOPILUA_DLL_MDB=$(BUILD_DIR)/KopiLua.dll.mdb
NLUA_DLL_SOURCE=../Core/NLua/bin/DebugKopiLua/NLua.dll
NLUA_DLL_MDB_SOURCE=../Core/NLua/bin/DebugKopiLua/NLua.dll.mdb
NLUA_DLL_MDB=$(BUILD_DIR)/NLua.dll.mdb
endif
if ENABLE_RELEASEKOPILUA_X64
ASSEMBLY_COMPILER_COMMAND = dmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ "-define:USE_KOPILUA"
ASSEMBLY = ../tests/NLuaTest.dll
ASSEMBLY_MDB =
COMPILE_TARGET = library
PROJECT_REFERENCES = \
../Core/KeraLua/src/bin/ReleaseKopiLua/KeraLua.dll \
../Core/KopiLua/KopiLua/bin/ReleaseKopiLua/KopiLua.dll \
../Core/NLua/bin/ReleaseKopiLua/NLua.dll
BUILD_DIR = ../tests/
NLUATEST_DLL_MDB=
NUNIT_FRAMEWORK_DLL_SOURCE=../packages/NUnit.2.6.2/lib/nunit.framework.dll
KERALUA_DLL_SOURCE=../Core/KeraLua/src/bin/ReleaseKopiLua/KeraLua.dll
KERALUA_DLL_MDB=
KOPILUA_DLL_SOURCE=../Core/KopiLua/KopiLua/bin/ReleaseKopiLua/KopiLua.dll
KOPILUA_DLL_MDB=
NLUA_DLL_SOURCE=../Core/NLua/bin/ReleaseKopiLua/NLua.dll
NLUA_DLL_MDB=
endif
AL=al
SATELLITE_ASSEMBLY_NAME=$(notdir $(basename $(ASSEMBLY))).resources.dll
PROGRAMFILES = \
$(NLUATEST_DLL_MDB) \
$(NUNIT_FRAMEWORK_DLL) \
$(KERALUA_DLL) \
$(KERALUA_DLL_MDB) \
$(KOPILUA_DLL) \
$(KOPILUA_DLL_MDB) \
$(NLUA_DLL) \
$(NLUA_DLL_MDB)
LINUX_PKGCONFIG = \
$(NLUATEST_40_PC)
RESGEN=resgen2
all: $(ASSEMBLY) $(PROGRAMFILES) $(LINUX_PKGCONFIG)
FILES = \
../tests/Entity.cs \
../tests/LuaTests.cs \
../tests/TestLua.cs \
../tests/Core.cs \
LoadFileTests.cs \
Properties/AssemblyInfo.cs \
AAACodeGenTests.cs
DATA_FILES =
RESOURCES =
EXTRAS = \
packages.config \
nluatest.40.pc.in
REFERENCES = \
System \
System.Data \
System.Numerics \
System.Xml
DLL_REFERENCES = \
../lib/nunit/nunit.framework.dll
CLEANFILES = $(PROGRAMFILES) $(LINUX_PKGCONFIG)
include $(top_srcdir)/Makefile.include
NUNIT_FRAMEWORK_DLL = $(BUILD_DIR)/nunit.framework.dll
KERALUA_DLL = $(BUILD_DIR)/KeraLua.dll
KOPILUA_DLL = $(BUILD_DIR)/KopiLua.dll
NLUA_DLL = $(BUILD_DIR)/NLua.dll
NLUATEST_40_PC = $(BUILD_DIR)/nluatest.40.pc
$(eval $(call emit-deploy-target,NUNIT_FRAMEWORK_DLL))
$(eval $(call emit-deploy-target,KERALUA_DLL))
$(eval $(call emit-deploy-target,KERALUA_DLL_MDB))
$(eval $(call emit-deploy-target,KOPILUA_DLL))
$(eval $(call emit-deploy-target,KOPILUA_DLL_MDB))
$(eval $(call emit-deploy-target,NLUA_DLL))
$(eval $(call emit-deploy-target,NLUA_DLL_MDB))
$(eval $(call emit-deploy-wrapper,NLUATEST_40_PC,nluatest.40.pc))
$(eval $(call emit_resgen_targets))
$(build_xamlg_list): %.xaml.g.cs: %.xaml
xamlg '$<'
$(ASSEMBLY_MDB): $(ASSEMBLY)
$(ASSEMBLY): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
mkdir -p $(shell dirname $(ASSEMBLY))
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D5FCADFA-5047-40C2-B392-256875862920}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLuaTest</RootNamespace>
<AssemblyName>NLuaTest</AssemblyName>
<FileAlignment>512</FileAlignment>
<ReleaseVersion>2.x</ReleaseVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>..\tests\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET_3_5</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>True</Optimize>
<OutputPath>..\tests\</OutputPath>
<DefineConstants>TRACE;NET_3_5</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugKopiLua|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\DebugKopiLua\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET_3_5;USE_KOPILUA</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseKopiLua|AnyCPU'">
<OutputPath>..\tests\</OutputPath>
<WarningLevel>4</WarningLevel>
<Optimize>true</Optimize>
<DefineConstants>NET_3_5;USE_KOPILUA</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Numerics" />
<Reference Include="System.Xml" />
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\tests\Entity.cs">
<Link>Entity.cs</Link>
</Compile>
<Compile Include="..\tests\LuaTests.cs">
<Link>LuaTests.cs</Link>
</Compile>
<Compile Include="..\tests\TestLua.cs">
<Link>TestLua.cs</Link>
</Compile>
<Compile Include="..\tests\Core.cs">
<Link>Core.cs</Link>
</Compile>
<Compile Include="LoadFileTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="AAACodeGenTests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\KeraLua\src\KeraLua.Net35.csproj">
<Project>{47153754-10f5-44d8-b578-f5a32b69061a}</Project>
<Name>KeraLua.Net35</Name>
</ProjectReference>
<ProjectReference Include="..\Core\KopiLua\KopiLua\KopiLua.Net35.csproj">
<Project>{e8ddbc21-ef74-4aba-9c49-bfc702be25d8}</Project>
<Name>KopiLua.Net35</Name>
</ProjectReference>
<ProjectReference Include="..\Core\NLua\NLua.Net35.csproj">
<Project>{f55cabbb-4108-4a39-94e1-581fd46dc021}</Project>
<Name>NLua.Net35</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D5FCADFA-5047-40C2-B392-256875862920}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLuaTest</RootNamespace>
<AssemblyName>NLuaTest</AssemblyName>
<FileAlignment>512</FileAlignment>
<ReleaseVersion>2.x</ReleaseVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>..\tests\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>True</Optimize>
<OutputPath>..\tests\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugKopiLua|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\DebugKopiLua\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseKopiLua|AnyCPU'">
<OutputPath>..\tests\</OutputPath>
<WarningLevel>4</WarningLevel>
<Optimize>true</Optimize>
<DefineConstants>USE_KOPILUA</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Numerics" />
<Reference Include="System.Xml" />
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\tests\Entity.cs">
<Link>Entity.cs</Link>
</Compile>
<Compile Include="..\tests\LuaTests.cs">
<Link>LuaTests.cs</Link>
</Compile>
<Compile Include="..\tests\TestLua.cs">
<Link>TestLua.cs</Link>
</Compile>
<Compile Include="..\tests\Core.cs">
<Link>Core.cs</Link>
</Compile>
<Compile Include="LoadFileTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="AAACodeGenTests.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\KeraLua\src\KeraLua.Net40.csproj">
<Project>{47153754-10F5-44D8-B578-F5A32B69061A}</Project>
<Name>KeraLua.Net40</Name>
</ProjectReference>
<ProjectReference Include="..\Core\KopiLua\KopiLua\KopiLua.Net40.csproj">
<Project>{E8DDBC21-EF74-4ABA-9C49-BFC702BE25D8}</Project>
<Name>KopiLua.Net40</Name>
</ProjectReference>
<ProjectReference Include="..\Core\NLua\NLua.Net40.csproj">
<Project>{F55CABBB-4108-4A39-94E1-581FD46DC021}</Project>
<Name>NLua.Net40</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D5FCADFA-5047-40C2-B392-256875862920}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLuaTest</RootNamespace>
<AssemblyName>NLuaTest</AssemblyName>
<FileAlignment>512</FileAlignment>
<ReleaseVersion>1.3.2</ReleaseVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>..\tests\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>True</Optimize>
<OutputPath>..\tests\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugKopiLua|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\DebugKopiLua\</OutputPath>
<DefineConstants>TRACE;DEBUG;USE_KOPILUA</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseKopiLua|AnyCPU'">
<OutputPath>..\tests\</OutputPath>
<WarningLevel>4</WarningLevel>
<Optimize>true</Optimize>
<Prefer32Bit>false</Prefer32Bit>
<DefineConstants>USE_KOPILUA</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Numerics" />
<Reference Include="System.Xml" />
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\tests\Entity.cs">
<Link>Entity.cs</Link>
</Compile>
<Compile Include="..\tests\LuaTests.cs">
<Link>LuaTests.cs</Link>
</Compile>
<Compile Include="..\tests\TestLua.cs">
<Link>TestLua.cs</Link>
</Compile>
<Compile Include="..\tests\Core.cs">
<Link>Core.cs</Link>
</Compile>
<Compile Include="LoadFileTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="AAACodeGenTests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<ProjectReference Include="..\Core\KeraLua\src\KeraLua.Net45.csproj">
<Project>{47153754-10F5-44D8-B578-F5A32B69061A}</Project>
<Name>KeraLua.Net45</Name>
</ProjectReference>
<ProjectReference Include="..\Core\KopiLua\KopiLua\KopiLua.Net45.csproj">
<Project>{E8DDBC21-EF74-4ABA-9C49-BFC702BE25D8}</Project>
<Name>KopiLua.Net45</Name>
</ProjectReference>
<ProjectReference Include="..\Core\NLua\NLua.Net45.csproj">
<Project>{F55CABBB-4108-4A39-94E1-581FD46DC021}</Project>
<Name>NLua.Net45</Name>
</ProjectReference>
</ItemGroup>
</Project>
\ No newline at end of file
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle ("NLuaTest")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("NLuaTest")]
[assembly: AssemblyCopyright ("Copyright © 2013")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible (false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid ("eaeb5ab2-711e-46eb-955f-fbb7b581e7aa")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion ("1.0.0.0")]
[assembly: AssemblyFileVersion ("1.0.0.0")]
Name: NLuaTest.40
Description: NLuaTest.40
Version: 2.x
Requires:
Libs: -r:@expanded_libdir@/@PACKAGE@/NLuaTest.dll
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with your package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
using System.Reflection;
using Android.App;
using Android.OS;
using Xamarin.Android.NUnitLite;
namespace NLuaTests.Android
{
[Activity (Label = "NLuaTests.Android", MainLauncher = true)]
public class MainActivity : TestSuiteActivity
{
protected override void OnCreate (Bundle bundle)
{
// tests can be inside the main assembly
AddTest (Assembly.GetExecutingAssembly ());
// or in any reference assemblies
// AddTest (typeof (Your.Library.TestClass).Assembly);
// Once you called base.OnCreate(), you cannot add more assemblies.
base.OnCreate (bundle);
}
}
}
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