Author: jbevain
Date: 2007-05-11 20:18:09 -0400 (Fri, 11 May 2007)
New Revision: 77273
Added:
trunk/cecil/tests/Mono.Cecil.Tests/AssemblyCreationTestFixture.cs
trunk/cecil/tests/TestCases/Creation/
trunk/cecil/tests/TestCases/Creation/HelloWorld.boo
Modified:
trunk/cecil/tests/Mono.Cecil.Tests.csproj
Log:
add first creation test
Added: trunk/cecil/tests/Mono.Cecil.Tests/AssemblyCreationTestFixture.cs
===================================================================
--- trunk/cecil/tests/Mono.Cecil.Tests/AssemblyCreationTestFixture.cs
2007-05-12 00:16:46 UTC (rev 77272)
+++ trunk/cecil/tests/Mono.Cecil.Tests/AssemblyCreationTestFixture.cs
2007-05-12 00:18:09 UTC (rev 77273)
@@ -0,0 +1,49 @@
+//
+// AssemblyCreationTestFixture.cs
+//
+// Author:
+// Jb Evain ([EMAIL PROTECTED])
+//
+// (C) 2007 Jb Evain
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.IO;
+using Mono.Bat;
+using NUnit.Framework;
+
+namespace Mono.Cecil.Tests {
+
+ [TestFixture]
+ public class AssemblyCreationTestFixture : AbstractAssemblyTestFixture {
+
+ [Test]
+ public void CreateHelloWorld ()
+ {
+ RunWriteAssemblyTestCase ("HelloWorld");
+ }
+
+ protected override string GetTestCasePath (string file)
+ {
+ return base.GetTestCasePath (Path.Combine ("Creation",
file));
+ }
+ }
+}
\ No newline at end of file
Property changes on:
trunk/cecil/tests/Mono.Cecil.Tests/AssemblyCreationTestFixture.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/cecil/tests/Mono.Cecil.Tests.csproj
===================================================================
--- trunk/cecil/tests/Mono.Cecil.Tests.csproj 2007-05-12 00:16:46 UTC (rev
77272)
+++ trunk/cecil/tests/Mono.Cecil.Tests.csproj 2007-05-12 00:18:09 UTC (rev
77273)
@@ -28,6 +28,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
+ <Compile Include="Mono.Cecil.Tests\AssemblyCreationTestFixture.cs" />
<Compile Include="Mono.Cecil.Tests\AssemblyInfo.cs" />
<Compile Include="Mono.Cecil.Tests\RegressionTestFixture.cs" />
</ItemGroup>
@@ -42,6 +43,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
+ <None Include="TestCases\Creation\HelloWorld.boo" />
<None Include="TestCases\Regression\SimpleAssembly.boo" />
</ItemGroup>
<ItemGroup>
Added: trunk/cecil/tests/TestCases/Creation/HelloWorld.boo
===================================================================
--- trunk/cecil/tests/TestCases/Creation/HelloWorld.boo 2007-05-12 00:16:46 UTC
(rev 77272)
+++ trunk/cecil/tests/TestCases/Creation/HelloWorld.boo 2007-05-12 00:18:09 UTC
(rev 77273)
@@ -0,0 +1,9 @@
+"""
+Hello, world!
+"""
+
+worker = Main.CilWorker
+
+worker.Emit(OpCodes.Ldstr, "Hello, world!")
+worker.Emit(OpCodes.Call, ImportConsoleWriteLine())
+worker.Emit(OpCodes.Ret)
Property changes on: trunk/cecil/tests/TestCases/Creation/HelloWorld.boo
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches