Permalink
Browse files

[cocos2d] add test for Mac bindings

  • Loading branch information...
1 parent c383593 commit 971b8e89b65341a7db99a89c7f86c81cede08888 @StephaneDelcroix StephaneDelcroix committed Mar 22, 2013
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{EF06FAFC-59D5-4027-AC58-1618122BBD5A}</ProjectGuid>
+ <ProjectTypeGuids>{42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Cocos2D.Bindings</RootNamespace>
+ <MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
+ <AssemblyName>binding-test-osx</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG; MONOMAC;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <UseSGen>false</UseSGen>
+ <IncludeMonoRuntime>false</IncludeMonoRuntime>
+ <EnablePackageSigning>false</EnablePackageSigning>
+ <CreatePackage>false</CreatePackage>
+ <EnableCodeSigning>false</EnableCodeSigning>
+ <CodeSigningKey>Mac Developer</CodeSigningKey>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <LinkMode>Full</LinkMode>
+ <UseSGen>false</UseSGen>
+ <IncludeMonoRuntime>true</IncludeMonoRuntime>
+ <EnablePackageSigning>false</EnablePackageSigning>
+ <CreatePackage>true</CreatePackage>
+ <ConsolePause>false</ConsolePause>
+ <EnableCodeSigning>true</EnableCodeSigning>
+ <CodeSigningKey>Developer ID Application</CodeSigningKey>
+ <DefineConstants>MONOMAC;</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhoneSimulator' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\iPhoneSimulator\AppStore</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <LinkMode>Full</LinkMode>
+ <UseSGen>false</UseSGen>
+ <IncludeMonoRuntime>true</IncludeMonoRuntime>
+ <PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey>
+ <EnablePackageSigning>true</EnablePackageSigning>
+ <ConsolePause>false</ConsolePause>
+ <CodeSigningKey>3rd Party Mac Developer Application</CodeSigningKey>
+ <EnableCodeSigning>true</EnableCodeSigning>
+ <CreatePackage>true</CreatePackage>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="XamMac" />
+ <Reference Include="nunit.core, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="nunit.core.interfaces, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="nunit.framework, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Cocos2DMacOS">
+ <HintPath>..\binding\Cocos2DMacOS.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Resources\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\v0.0\Xamarin.Mac.targets" />
+ <ItemGroup>
+ <Compile Include="..\..\..\maccore\tests\bindings\ApiSelectorTest.cs">
+ <Link>ApiSelectorTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\maccore\tests\bindings\ApiSignatureTest.cs">
+ <Link>ApiSignatureTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\maccore\tests\bindings\ApiBaseTest.cs">
+ <Link>ApiBaseTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\maccore\tests\bindings\ApiCtorInitTest.cs">
+ <Link>ApiCtorInitTest.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\maccore\tests\bindings\ApiFieldTest.cs">
+ <Link>ApiFieldTest.cs</Link>
+ </Compile>
+ <Compile Include="..\binding-test\BindingFieldTest.cs">
+ <Link>BindingFieldTest.cs</Link>
+ </Compile>
+ <Compile Include="..\binding-test\BindingSignatureTest.cs">
+ <Link>BindingSignatureTest.cs</Link>
+ </Compile>
+ </ItemGroup>
+</Project>
@@ -18,16 +18,22 @@
//
using System;
+using System.Drawing;
using System.Reflection;
using System.Collections.Generic;
using NUnit.Framework;
using TouchUnit.Bindings;
+#if MONOMAC
+using MonoMac.AppKit;
+using MonoMac.Cocos2D;
+using MonoMac.Foundation;
+#else
using MonoTouch.UIKit;
using MonoTouch.Cocos2D;
using MonoTouch.Foundation;
-
+#endif
namespace Cocos2D.Bindings {
[TestFixture]
@@ -60,9 +66,14 @@ public void Setup ()
{
//Some types require a working Director, like CCTextureCache
var director = CCDirector.SharedDirector;
+#if MONOMAC
+ //var glView = new CCGLView ();
+#else
var glView = new CCGLView (MonoTouch.UIKit.UIScreen.MainScreen.Bounds);
director.View = glView;
//UIApplication.SharedApplication.Windows[0].RootViewController.PresentViewController (new UINavigationController (director), false, null);
+#endif
+
}
//[TearDown]
@@ -23,8 +23,12 @@
using NUnit.Framework;
using TouchUnit.Bindings;
+#if MONOMAC
+using MonoMac.Cocos2D;
+#else
using MonoTouch.Cocos2D;
using MonoTouch.Foundation;
+#endif
namespace Cocos2D.Bindings {
@@ -23,7 +23,12 @@
using NUnit.Framework;
using TouchUnit.Bindings;
+#if MONOMAC
+using MonoMac.Cocos2D;
+#else
using MonoTouch.Cocos2D;
+using MonoTouch.Foundation;
+#endif
namespace Cocos2D.Bindings {
View
@@ -1,46 +1,67 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "binding-test", "binding-test\binding-test.csproj", "{91400136-42A8-4C7E-886C-217AB352AF48}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jumpy", "samples\Jumpy\Jumpy\Jumpy.csproj", "{F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|iPhoneSimulator = Debug|iPhoneSimulator
- Release|iPhoneSimulator = Release|iPhoneSimulator
- Debug|iPhone = Debug|iPhone
- Release|iPhone = Release|iPhone
- Ad-Hoc|iPhone = Ad-Hoc|iPhone
- AppStore|iPhone = AppStore|iPhone
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {91400136-42A8-4C7E-886C-217AB352AF48}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
- {91400136-42A8-4C7E-886C-217AB352AF48}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
- {91400136-42A8-4C7E-886C-217AB352AF48}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
- {91400136-42A8-4C7E-886C-217AB352AF48}.AppStore|iPhone.Build.0 = AppStore|iPhone
- {91400136-42A8-4C7E-886C-217AB352AF48}.Debug|iPhone.ActiveCfg = Debug|iPhone
- {91400136-42A8-4C7E-886C-217AB352AF48}.Debug|iPhone.Build.0 = Debug|iPhone
- {91400136-42A8-4C7E-886C-217AB352AF48}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
- {91400136-42A8-4C7E-886C-217AB352AF48}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
- {91400136-42A8-4C7E-886C-217AB352AF48}.Release|iPhone.ActiveCfg = Release|iPhone
- {91400136-42A8-4C7E-886C-217AB352AF48}.Release|iPhone.Build.0 = Release|iPhone
- {91400136-42A8-4C7E-886C-217AB352AF48}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
- {91400136-42A8-4C7E-886C-217AB352AF48}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.AppStore|iPhone.Build.0 = AppStore|iPhone
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Debug|iPhone.ActiveCfg = Debug|iPhone
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Debug|iPhone.Build.0 = Debug|iPhone
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Release|iPhone.ActiveCfg = Release|iPhone
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Release|iPhone.Build.0 = Release|iPhone
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
- {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
- EndGlobalSection
- GlobalSection(MonoDevelopProperties) = preSolution
- StartupItem = binding-test\binding-test.csproj
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "binding-test", "binding-test\binding-test.csproj", "{91400136-42A8-4C7E-886C-217AB352AF48}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jumpy", "samples\Jumpy\Jumpy\Jumpy.csproj", "{F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "binding-test-osx", "binding-test-osx\binding-test-osx.csproj", "{EF06FAFC-59D5-4027-AC58-1618122BBD5A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Release|iPhoneSimulator = Release|iPhoneSimulator
+ Debug|iPhone = Debug|iPhone
+ Release|iPhone = Release|iPhone
+ Ad-Hoc|iPhone = Ad-Hoc|iPhone
+ AppStore|iPhone = AppStore|iPhone
+ AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {91400136-42A8-4C7E-886C-217AB352AF48}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
+ {91400136-42A8-4C7E-886C-217AB352AF48}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
+ {91400136-42A8-4C7E-886C-217AB352AF48}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
+ {91400136-42A8-4C7E-886C-217AB352AF48}.AppStore|iPhone.Build.0 = AppStore|iPhone
+ {91400136-42A8-4C7E-886C-217AB352AF48}.AppStore|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {91400136-42A8-4C7E-886C-217AB352AF48}.AppStore|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {91400136-42A8-4C7E-886C-217AB352AF48}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {91400136-42A8-4C7E-886C-217AB352AF48}.Debug|iPhone.Build.0 = Debug|iPhone
+ {91400136-42A8-4C7E-886C-217AB352AF48}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {91400136-42A8-4C7E-886C-217AB352AF48}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {91400136-42A8-4C7E-886C-217AB352AF48}.Release|iPhone.ActiveCfg = Release|iPhone
+ {91400136-42A8-4C7E-886C-217AB352AF48}.Release|iPhone.Build.0 = Release|iPhone
+ {91400136-42A8-4C7E-886C-217AB352AF48}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {91400136-42A8-4C7E-886C-217AB352AF48}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.Ad-Hoc|iPhone.ActiveCfg = Debug|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.Ad-Hoc|iPhone.Build.0 = Debug|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.AppStore|iPhone.ActiveCfg = AppStore|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.AppStore|iPhone.Build.0 = AppStore|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.Debug|iPhone.ActiveCfg = Debug|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.Debug|iPhone.Build.0 = Debug|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.Release|iPhone.ActiveCfg = Release|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.Release|iPhone.Build.0 = Release|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {EF06FAFC-59D5-4027-AC58-1618122BBD5A}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.AppStore|iPhone.Build.0 = AppStore|iPhone
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.AppStore|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.AppStore|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Debug|iPhone.Build.0 = Debug|iPhone
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Release|iPhone.ActiveCfg = Release|iPhone
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Release|iPhone.Build.0 = Release|iPhone
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {F7F2973E-A67D-4719-8B9F-7A16BAE62FA4}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = binding-test\binding-test.csproj
+ EndGlobalSection
+EndGlobal

0 comments on commit 971b8e8

Please sign in to comment.