Author: jbevain
Date: 2007-05-11 21:16:00 -0400 (Fri, 11 May 2007)
New Revision: 77275
Added:
trunk/cecil/tests/Mono.Cecil.Tests/RoundTripTestFixture.cs
trunk/cecil/tests/TestCases/RoundTrip/
trunk/cecil/tests/TestCases/RoundTrip/GenericIterator.boo
Modified:
trunk/cecil/tests/Mono.Cecil.Tests.csproj
trunk/cecil/tests/Mono.Cecil.Tests/AssemblyCreationTestFixture.cs
Log:
test round trip capacities
Modified: trunk/cecil/tests/Mono.Cecil.Tests/AssemblyCreationTestFixture.cs
===================================================================
--- trunk/cecil/tests/Mono.Cecil.Tests/AssemblyCreationTestFixture.cs
2007-05-12 01:14:41 UTC (rev 77274)
+++ trunk/cecil/tests/Mono.Cecil.Tests/AssemblyCreationTestFixture.cs
2007-05-12 01:16:00 UTC (rev 77275)
@@ -46,4 +46,4 @@
return base.GetTestCasePath (Path.Combine ("Creation",
file));
}
}
-}
\ No newline at end of file
+}
Added: trunk/cecil/tests/Mono.Cecil.Tests/RoundTripTestFixture.cs
===================================================================
--- trunk/cecil/tests/Mono.Cecil.Tests/RoundTripTestFixture.cs 2007-05-12
01:14:41 UTC (rev 77274)
+++ trunk/cecil/tests/Mono.Cecil.Tests/RoundTripTestFixture.cs 2007-05-12
01:16:00 UTC (rev 77275)
@@ -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 RoundTripTestFixture : AbstractAssemblyTestFixture {
+
+ [Test]
+ public void GenericIterator ()
+ {
+ RunCSharpRoundTripTestCase ("GenericIterator");
+ }
+
+ protected override string GetTestCasePath (string file)
+ {
+ return base.GetTestCasePath (Path.Combine ("RoundTrip",
file));
+ }
+ }
+}
Property changes on: trunk/cecil/tests/Mono.Cecil.Tests/RoundTripTestFixture.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/cecil/tests/Mono.Cecil.Tests.csproj
===================================================================
--- trunk/cecil/tests/Mono.Cecil.Tests.csproj 2007-05-12 01:14:41 UTC (rev
77274)
+++ trunk/cecil/tests/Mono.Cecil.Tests.csproj 2007-05-12 01:16:00 UTC (rev
77275)
@@ -30,6 +30,7 @@
<ItemGroup>
<Compile Include="Mono.Cecil.Tests\AssemblyCreationTestFixture.cs" />
<Compile Include="Mono.Cecil.Tests\AssemblyInfo.cs" />
+ <Compile Include="Mono.Cecil.Tests\RoundTripTestFixture.cs" />
<Compile Include="Mono.Cecil.Tests\RegressionTestFixture.cs" />
</ItemGroup>
<ItemGroup>
@@ -45,6 +46,7 @@
<ItemGroup>
<None Include="TestCases\Creation\HelloWorld.boo" />
<None Include="TestCases\Regression\SimpleAssembly.boo" />
+ <None Include="TestCases\RoundTrip\GenericIterator.boo" />
</ItemGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=2.4.0.2, Culture=neutral,
PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
Added: trunk/cecil/tests/TestCases/RoundTrip/GenericIterator.boo
===================================================================
--- trunk/cecil/tests/TestCases/RoundTrip/GenericIterator.boo 2007-05-12
01:14:41 UTC (rev 77274)
+++ trunk/cecil/tests/TestCases/RoundTrip/GenericIterator.boo 2007-05-12
01:16:00 UTC (rev 77275)
@@ -0,0 +1,29 @@
+"""
+1
+2
+3
+"""
+
+CODE = """
+using System;
+using System.Collections.Generic;
+
+public class Program
+{
+ public static void Main(string[] args)
+ {
+ foreach (int i in GetNumbers())
+ {
+ Console.WriteLine(i);
+ }
+ }
+
+ static IEnumerable<int> GetNumbers()
+ {
+ for (int i=0; i<3; ++i)
+ {
+ yield return i+1;
+ }
+ }
+}
+"""
Property changes on: trunk/cecil/tests/TestCases/RoundTrip/GenericIterator.boo
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches