diff options
author | Marek Safar <marek.safar@gmail.com> | 2012-12-03 21:06:50 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2012-12-03 22:16:03 +0400 |
commit | a35bd3504bc4086777aece12fee16f4ac0a1fea3 (patch) | |
tree | f9f2075843be2482f43080bd0c955eca480851c9 | |
parent | ec3740aa803f594718e5080f733bd2b5988f7d4d (diff) |
Add MonoTouch test skeleton project
-rw-r--r-- | mcs/tests/known-issues-mt | 18 | ||||
-rw-r--r-- | mcs/tests/projects/MonoTouch/AppDelegate.cs | 46 | ||||
-rw-r--r-- | mcs/tests/projects/MonoTouch/Info.plist | 26 | ||||
-rw-r--r-- | mcs/tests/projects/MonoTouch/Main.cs | 20 | ||||
-rw-r--r-- | mcs/tests/projects/MonoTouch/MonoTouch.csproj.template | 98 | ||||
-rw-r--r-- | mcs/tests/projects/MonoTouch/MonoTouch.sln | 32 | ||||
-rw-r--r-- | mcs/tests/projects/MonoTouch/ivt.cs | 3 |
7 files changed, 243 insertions, 0 deletions
diff --git a/mcs/tests/known-issues-mt b/mcs/tests/known-issues-mt new file mode 100644 index 00000000000..d1cbb3546ec --- /dev/null +++ b/mcs/tests/known-issues-mt @@ -0,0 +1,18 @@ +# This file contains test files which cause any type of error. + +# This file supports extended syntax +# csXXXX.cs : test case causes error +# csXXXX.cs IGNORE : adds test to ignore list + +gtest-230.cs + +# exluded (tricky to build, extra dependency or hitting MT restrictions) +gtest-444.cs SKIP +gtest-exmethod-23.cs SKIP +test-468.cs SKIP +test-616.cs SKIP +test-695.cs SKIP +test-814.cs SKIP + +# MT missing dependency bugs + diff --git a/mcs/tests/projects/MonoTouch/AppDelegate.cs b/mcs/tests/projects/MonoTouch/AppDelegate.cs new file mode 100644 index 00000000000..bcc65f2e4b1 --- /dev/null +++ b/mcs/tests/projects/MonoTouch/AppDelegate.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using MonoTouch.Foundation; +using MonoTouch.UIKit; +using MonoTouch.NUnit.UI; + +namespace TestMcs +{ + // The UIApplicationDelegate for the application. This class is responsible for launching the + // User Interface of the application, as well as listening (and optionally responding) to + // application events from iOS. + [Register ("AppDelegate")] + public partial class AppDelegate : UIApplicationDelegate + { + // class-level declarations + UIWindow window; + TouchRunner runner; + + // + // This method is invoked when the application has loaded and is ready to run. In this + // method you should instantiate the window, load the UI into it and then make the window + // visible. + // + // You have 17 seconds to return from this method, or iOS will terminate your application. + // + public override bool FinishedLaunching (UIApplication app, NSDictionary options) + { + // create a new window instance based on the screen size + window = new UIWindow (UIScreen.MainScreen.Bounds); + runner = new TouchRunner (window); + + // register every tests included in the main application/assembly + runner.Add (System.Reflection.Assembly.GetExecutingAssembly ()); + + window.RootViewController = new UINavigationController (runner.GetViewController ()); + + // make the window visible + window.MakeKeyAndVisible (); + + return true; + } + } +} + diff --git a/mcs/tests/projects/MonoTouch/Info.plist b/mcs/tests/projects/MonoTouch/Info.plist new file mode 100644 index 00000000000..8653860cff0 --- /dev/null +++ b/mcs/tests/projects/MonoTouch/Info.plist @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>UIDeviceFamily</key> + <array> + <integer>1</integer> + <integer>2</integer> + </array> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>UISupportedInterfaceOrientations~ipad</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>MinimumOSVersion</key> + <string>3.2</string> +</dict> +</plist> diff --git a/mcs/tests/projects/MonoTouch/Main.cs b/mcs/tests/projects/MonoTouch/Main.cs new file mode 100644 index 00000000000..4048e273c7b --- /dev/null +++ b/mcs/tests/projects/MonoTouch/Main.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using MonoTouch.Foundation; +using MonoTouch.UIKit; + +namespace TestMcs +{ + public class Application + { + // This is the main entry point of the application. + static void Main (string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main (args, null, "AppDelegate"); + } + } +} diff --git a/mcs/tests/projects/MonoTouch/MonoTouch.csproj.template b/mcs/tests/projects/MonoTouch/MonoTouch.csproj.template new file mode 100644 index 00000000000..779080fa99a --- /dev/null +++ b/mcs/tests/projects/MonoTouch/MonoTouch.csproj.template @@ -0,0 +1,98 @@ +<?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>{00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}</ProjectGuid> + <ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <OutputType>Exe</OutputType> + <RootNamespace>TestMcs</RootNamespace> + <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> + <AssemblyName>TestMcs</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' "> + <DebugSymbols>True</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>False</Optimize> + <OutputPath>bin\iPhoneSimulator\Debug</OutputPath> + <DefineConstants>DEBUG;</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>False</ConsolePause> + <MtouchLink>None</MtouchLink> + <MtouchDebug>True</MtouchDebug> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> + <DebugType>none</DebugType> + <Optimize>True</Optimize> + <OutputPath>bin\iPhoneSimulator\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>False</ConsolePause> + <MtouchLink>None</MtouchLink> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' "> + <DebugSymbols>True</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>False</Optimize> + <OutputPath>bin\iPhone\Debug</OutputPath> + <DefineConstants>DEBUG;</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>False</ConsolePause> + <MtouchDebug>True</MtouchDebug> + <CodesignKey>iPhone Developer</CodesignKey> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' "> + <DebugType>none</DebugType> + <Optimize>True</Optimize> + <OutputPath>bin\iPhone\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>False</ConsolePause> + <CodesignKey>iPhone Developer</CodesignKey> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' "> + <DebugType>none</DebugType> + <Optimize>True</Optimize> + <OutputPath>bin\iPhone\Ad-Hoc</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <BuildIpa>True</BuildIpa> + <ConsolePause>False</ConsolePause> + <CodesignProvision>Automatic:AdHoc</CodesignProvision> + <CodesignKey>iPhone Distribution</CodesignKey> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' "> + <DebugType>none</DebugType> + <Optimize>True</Optimize> + <OutputPath>bin\iPhone\AppStore</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>False</ConsolePause> + <CodesignKey>iPhone Distribution</CodesignKey> + <CodesignProvision>Automatic:AppStore</CodesignProvision> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Xml" /> + <Reference Include="System.Core" /> + <Reference Include="monotouch" /> + <Reference Include="MonoTouch.NUnitLite" /> +@GENERATED_REFERENCES + </ItemGroup> + <ItemGroup> + <Folder Include="Resources\" /> + </ItemGroup> + <ItemGroup> + <None Include="Info.plist" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Main.cs" /> + <Compile Include="AppDelegate.cs" /> + <Compile Include="@TEST_SOURCEFILE" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/mcs/tests/projects/MonoTouch/MonoTouch.sln b/mcs/tests/projects/MonoTouch/MonoTouch.sln new file mode 100644 index 00000000000..cbffbd93184 --- /dev/null +++ b/mcs/tests/projects/MonoTouch/MonoTouch.sln @@ -0,0 +1,32 @@ +
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoTouch", "MonoTouch.csproj", "{00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}"
+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
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.AppStore|iPhone.Build.0 = AppStore|iPhone
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.Debug|iPhone.Build.0 = Debug|iPhone
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.Release|iPhone.ActiveCfg = Release|iPhone
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.Release|iPhone.Build.0 = Release|iPhone
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {00C88FC7-0FAA-4E5F-A9E6-C4343F1F30D8}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = MonoTouch.csproj
+ EndGlobalSection
+EndGlobal
diff --git a/mcs/tests/projects/MonoTouch/ivt.cs b/mcs/tests/projects/MonoTouch/ivt.cs new file mode 100644 index 00000000000..f7b4a48a20b --- /dev/null +++ b/mcs/tests/projects/MonoTouch/ivt.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo ("TestMcs")] |