Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/Boddlnagg/MOSA-Project
Browse files Browse the repository at this point in the history
  • Loading branch information
tgiphil committed Mar 18, 2012
2 parents 1cd0153 + bcfa646 commit 4825d51
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 88 deletions.
43 changes: 28 additions & 15 deletions Source/Mosa.Test.Cases/IL/Initobj.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Licensed under the terms of the New BSD License. * Licensed under the terms of the New BSD License.
* *
* Authors: * Authors:
* Phil Garcia (tgiphil) <phil@thinkedge.com> * Kai Patrick Reisert (Boddlnagg) <kpreisert@googlemail.com>
* *
*/ */



using MbUnit.Framework; using MbUnit.Framework;


Expand All @@ -25,81 +25,94 @@ public Initobj()
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjU1() public void InitobjU1()
{ {
Assert.AreEqual(InitobjTests.InitobjTestU1(), Run<byte>("Mosa.Test.Collection", "InitobjTests", "InitobjTestU1")); //Assert.AreEqual(InitobjTests.InitobjTestU1(), Run<byte>("Mosa.Test.Collection", "InitobjTests", "InitobjTestU1"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjU2() public void InitobjU2()
{ {
Assert.AreEqual(InitobjTests.InitobjTestU2(), Run<ushort>("Mosa.Test.Collection", "InitobjTests", "InitobjTestU2")); //Assert.AreEqual(InitobjTests.InitobjTestU2(), Run<ushort>("Mosa.Test.Collection", "InitobjTests", "InitobjTestU2"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjU4() public void InitobjU4()
{ {
Assert.AreEqual(InitobjTests.InitobjTestU4(), Run<uint>("Mosa.Test.Collection", "InitobjTests", "InitobjTestU4")); //Assert.AreEqual(InitobjTests.InitobjTestU4(), Run<uint>("Mosa.Test.Collection", "InitobjTests", "InitobjTestU4"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjU8() public void InitobjU8()
{ {
Assert.AreEqual(InitobjTests.InitobjTestU8(), Run<ulong>("Mosa.Test.Collection", "InitobjTests", "InitobjTestU8")); //Assert.AreEqual(InitobjTests.InitobjTestU8(), Run<ulong>("Mosa.Test.Collection", "InitobjTests", "InitobjTestU8"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjI1() public void InitobjI1()
{ {
Assert.AreEqual(InitobjTests.InitobjTestI1(), Run<sbyte>("Mosa.Test.Collection", "InitobjTests", "InitobjTestI1")); //Assert.AreEqual(InitobjTests.InitobjTestI1(), Run<sbyte>("Mosa.Test.Collection", "InitobjTests", "InitobjTestI1"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjI2() public void InitobjI2()
{ {
Assert.AreEqual(InitobjTests.InitobjTestI2(), Run<short>("Mosa.Test.Collection", "InitobjTests", "InitobjTestI2")); //Assert.AreEqual(InitobjTests.InitobjTestI2(), Run<short>("Mosa.Test.Collection", "InitobjTests", "InitobjTestI2"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjI4() public void InitobjI4()
{ {
Assert.AreEqual(InitobjTests.InitobjTestI4(), Run<int>("Mosa.Test.Collection", "InitobjTests", "InitobjTestI4")); //Assert.AreEqual(InitobjTests.InitobjTestI4(), Run<int>("Mosa.Test.Collection", "InitobjTests", "InitobjTestI4"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjI8() public void InitobjI8()
{ {
Assert.AreEqual(InitobjTests.InitobjTestI8(), Run<long>("Mosa.Test.Collection", "InitobjTests", "InitobjTestI8")); //Assert.AreEqual(InitobjTests.InitobjTestI8(), Run<long>("Mosa.Test.Collection", "InitobjTests", "InitobjTestI8"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjR4() public void InitobjR4()
{ {
Assert.AreEqual(InitobjTests.InitobjTestR4(), Run<float>("Mosa.Test.Collection", "InitobjTests", "InitobjTestR4")); //Assert.AreEqual(InitobjTests.InitobjTestR4(), Run<float>("Mosa.Test.Collection", "InitobjTests", "InitobjTestR4"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjR8() public void InitobjR8()
{ {
Assert.AreEqual(InitobjTests.InitobjTestR8(), Run<double>("Mosa.Test.Collection", "InitobjTests", "InitobjTestR8")); //Assert.AreEqual(InitobjTests.InitobjTestR8(), Run<double>("Mosa.Test.Collection", "InitobjTests", "InitobjTestR8"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjB() public void InitobjB()
{ {
Assert.AreEqual(InitobjTests.InitobjTestB(), Run<bool>("Mosa.Test.Collection", "InitobjTests", "InitobjTestB")); //Assert.AreEqual(InitobjTests.InitobjTestB(), Run<bool>("Mosa.Test.Collection", "InitobjTests", "InitobjTestB"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjC() public void InitobjC()
{ {
Assert.AreEqual(InitobjTests.InitobjTestC(), Run<char>("Mosa.Test.Collection", "InitobjTests", "InitobjTestC")); //Assert.AreEqual(InitobjTests.InitobjTestC(), Run<char>("Mosa.Test.Collection", "InitobjTests", "InitobjTestC"));
} }


[Test] [Test]
[Pending("Commented out until implemented")]
public void InitobjO() public void InitobjO()
{ {
Assert.AreEqual(InitobjTests.InitobjTestO(), Run<object>("Mosa.Test.Collection", "InitobjTests", "InitobjTestO")); //Assert.AreEqual(InitobjTests.InitobjTestO(), Run<object>("Mosa.Test.Collection", "InitobjTests", "InitobjTestO"));
} }


} }
Expand Down
14 changes: 12 additions & 2 deletions Source/Mosa.Test.Cases/IL/Initobj.tt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,13 @@
<#@ include file="../TemplateLibrary.txt" #> /*
* (c) 2011 MOSA - The Managed Operating System Alliance
*
* Licensed under the terms of the New BSD License.
*
* Authors:
* Kai Patrick Reisert (Boddlnagg) <kpreisert@googlemail.com>
*
*/
<#@ include file="../TemplateLibrary.txt" #>


using MbUnit.Framework; using MbUnit.Framework;


Expand All @@ -17,9 +26,10 @@ namespace Mosa.Test.Cases.IL
<# foreach (KeyValuePair<string, string> primitive in PrimitivesWithCharAndObject) { #> <# foreach (KeyValuePair<string, string> primitive in PrimitivesWithCharAndObject) { #>


[Test] [Test]
[Pending("Commented out until implemented")]
public void Initobj<#= primitive.Value #>() public void Initobj<#= primitive.Value #>()
{ {
Assert.AreEqual(InitobjTests.InitobjTest<#= primitive.Value #>(), Run<<#= primitive.Key #>>("Mosa.Test.Collection", "InitobjTests", "InitobjTest<#= primitive.Value #>")); //Assert.AreEqual(InitobjTests.InitobjTest<#= primitive.Value #>(), Run<<#= primitive.Key #>>("Mosa.Test.Collection", "InitobjTests", "InitobjTest<#= primitive.Value #>"));
} }
<# } #> <# } #>


Expand Down
4 changes: 3 additions & 1 deletion Source/Mosa.Test.Cases/TemplateLibrary.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,5 @@
/* <#
/*
* (c) 2011 MOSA - The Managed Operating System Alliance * (c) 2011 MOSA - The Managed Operating System Alliance
* *
* Licensed under the terms of the New BSD License. * Licensed under the terms of the New BSD License.
Expand All @@ -7,6 +8,7 @@
* Phil Garcia (tgiphil) <phil@thinkedge.com> * Phil Garcia (tgiphil) <phil@thinkedge.com>
* *
*/ */
#>
<#@ template language="C#" #> <#@ template language="C#" #>
<#@ import namespace="System.Collections" #> <#@ import namespace="System.Collections" #>
<#@ import namespace="System.Collections.Generic" #> <#@ import namespace="System.Collections.Generic" #>
Expand Down
130 changes: 65 additions & 65 deletions Source/Mosa.Test.Collection/InitobjTests.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -30,83 +30,83 @@ public struct InitobjTestsStruct


public static class InitobjTests public static class InitobjTests
{ {
public static byte InitobjTestU1() //public static byte InitobjTestU1()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueU1; // return d.ValueU1;
} //}


public static ushort InitobjTestU2() //public static ushort InitobjTestU2()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueU2; // return d.ValueU2;
} //}


public static uint InitobjTestU4() //public static uint InitobjTestU4()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueU4; // return d.ValueU4;
} //}


public static ulong InitobjTestU8() //public static ulong InitobjTestU8()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueU8; // return d.ValueU8;
} //}


public static sbyte InitobjTestI1() //public static sbyte InitobjTestI1()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueI1; // return d.ValueI1;
} //}


public static short InitobjTestI2() //public static short InitobjTestI2()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueI2; // return d.ValueI2;
} //}


public static int InitobjTestI4() //public static int InitobjTestI4()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueI4; // return d.ValueI4;
} //}


public static long InitobjTestI8() //public static long InitobjTestI8()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueI8; // return d.ValueI8;
} //}


public static float InitobjTestR4() //public static float InitobjTestR4()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueR4; // return d.ValueR4;
} //}


public static double InitobjTestR8() //public static double InitobjTestR8()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueR8; // return d.ValueR8;
} //}


public static bool InitobjTestB() //public static bool InitobjTestB()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueB; // return d.ValueB;
} //}


public static char InitobjTestC() //public static char InitobjTestC()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueC; // return d.ValueC;
} //}


public static object InitobjTestO() //public static object InitobjTestO()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.ValueO; // return d.ValueO;
} //}


} }
} }
10 changes: 5 additions & 5 deletions Source/Mosa.Test.Collection/InitobjTests.tt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ namespace Mosa.Test.Collection
public static class InitobjTests public static class InitobjTests
{ {
<# foreach (KeyValuePair<string, string> primitives in PrimitivesWithCharAndObject) {#> <# foreach (KeyValuePair<string, string> primitives in PrimitivesWithCharAndObject) {#>
public static <#= primitives.Key #> InitobjTest<#= primitives.Value #>() //public static <#= primitives.Key #> InitobjTest<#= primitives.Value #>()
{ //{
InitobjTestsStruct d = new InitobjTestsStruct(); // InitobjTestsStruct d = new InitobjTestsStruct();
return d.Value<#= primitives.Value #>; // return d.Value<#= primitives.Value #>;
} //}


<# } #> <# } #>
} }
Expand Down

0 comments on commit 4825d51

Please sign in to comment.