Skip to content

Commit

Permalink
Update to nunit 2.5.10
Browse files Browse the repository at this point in the history
  • Loading branch information
jbevain committed Oct 26, 2011
1 parent 5f08444 commit ecdd745
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 57 deletions.
12 changes: 6 additions & 6 deletions Test/Mono.Cecil.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Reference Include="nunit.core, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.core, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>libs\nunit-2.4.8\nunit.core.dll</HintPath>
<HintPath>libs\nunit-2.5.10\nunit.core.dll</HintPath>
</Reference>
<Reference Include="nunit.core.interfaces, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.core.interfaces, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>libs\nunit-2.4.8\nunit.core.interfaces.dll</HintPath>
<HintPath>libs\nunit-2.5.10\nunit.core.interfaces.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.framework, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>libs\nunit-2.4.8\nunit.framework.dll</HintPath>
<HintPath>libs\nunit-2.5.10\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
</ItemGroup>
Expand Down
8 changes: 5 additions & 3 deletions Test/Mono.Cecil.Tests/Addin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,17 @@ ModuleDefinition RoundTrip (string location, ReaderParameters reader_parameters,
return ModuleDefinition.ReadModule (rt_module, reader_parameters);
}

public override void RunTestMethod (TestCaseResult testResult)
public override TestResult RunTest ()
{
var result = new TestResult (TestName);
var module = GetModule ();
if (module == null)
return;
return result;

Reflect.InvokeMethod (Method, Fixture, new object [] { module });

testResult.Success ();
result.Success ();
return result;
}
}

Expand Down
8 changes: 4 additions & 4 deletions Test/Mono.Cecil.Tests/FieldTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,25 +245,25 @@ public void ConstantCoalescing (ModuleDefinition module)
var field = fields.GetField ("int32_int16");
Assert.AreEqual ("System.Int32", field.FieldType.FullName);
Assert.IsTrue (field.HasConstant);
Assert.IsInstanceOfType (typeof (short), field.Constant);
Assert.IsInstanceOf (typeof (short), field.Constant);
Assert.AreEqual ((short) 1, field.Constant);

field = fields.GetField ("int16_int32");
Assert.AreEqual ("System.Int16", field.FieldType.FullName);
Assert.IsTrue (field.HasConstant);
Assert.IsInstanceOfType (typeof (int), field.Constant);
Assert.IsInstanceOf (typeof (int), field.Constant);
Assert.AreEqual (1, field.Constant);

field = fields.GetField ("char_int16");
Assert.AreEqual ("System.Char", field.FieldType.FullName);
Assert.IsTrue (field.HasConstant);
Assert.IsInstanceOfType (typeof (short), field.Constant);
Assert.IsInstanceOf (typeof (short), field.Constant);
Assert.AreEqual ((short) 1, field.Constant);

field = fields.GetField ("int16_char");
Assert.AreEqual ("System.Int16", field.FieldType.FullName);
Assert.IsTrue (field.HasConstant);
Assert.IsInstanceOfType (typeof (char), field.Constant);
Assert.IsInstanceOf (typeof (char), field.Constant);
Assert.AreEqual ('s', field.Constant);
}

Expand Down
34 changes: 17 additions & 17 deletions Test/Mono.Cecil.Tests/TypeParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void SimpleStringReference ()
Assert.AreEqual ("String", type.Name);
Assert.AreEqual (MetadataType.String, type.MetadataType);
Assert.IsFalse (type.IsValueType);
Assert.IsInstanceOfType (typeof (TypeReference), type);
Assert.IsInstanceOf (typeof (TypeReference), type);
}

[Test]
Expand All @@ -43,7 +43,7 @@ public void SimpleInt32Reference ()
Assert.AreEqual ("Int32", type.Name);
Assert.AreEqual (MetadataType.Int32, type.MetadataType);
Assert.IsTrue (type.IsValueType);
Assert.IsInstanceOfType (typeof (TypeReference), type);
Assert.IsInstanceOf (typeof (TypeReference), type);
}

[Test]
Expand All @@ -59,7 +59,7 @@ public void SimpleTypeDefinition ()
Assert.AreEqual (module, type.Module);
Assert.AreEqual ("Mono.Cecil.Tests", type.Namespace);
Assert.AreEqual ("TypeParserTests", type.Name);
Assert.IsInstanceOfType (typeof (TypeDefinition), type);
Assert.IsInstanceOf (typeof (TypeDefinition), type);
}

[Test]
Expand All @@ -72,7 +72,7 @@ public void ByRefTypeReference ()

var type = TypeParser.ParseType (module, fullname);

Assert.IsInstanceOfType (typeof (ByReferenceType), type);
Assert.IsInstanceOf (typeof (ByReferenceType), type);

type = ((ByReferenceType) type).ElementType;

Expand All @@ -81,7 +81,7 @@ public void ByRefTypeReference ()
Assert.AreEqual (module, type.Module);
Assert.AreEqual ("System", type.Namespace);
Assert.AreEqual ("String", type.Name);
Assert.IsInstanceOfType (typeof (TypeReference), type);
Assert.IsInstanceOf (typeof (TypeReference), type);
}

[Test]
Expand All @@ -98,7 +98,7 @@ public void FullyQualifiedTypeReference ()
Assert.AreEqual (module, type.Module);
Assert.AreEqual ("Mono.Cecil", type.Namespace);
Assert.AreEqual ("TypeDefinition", type.Name);
Assert.IsInstanceOfType (typeof (TypeReference), type);
Assert.IsInstanceOf (typeof (TypeReference), type);
}

[Test]
Expand All @@ -115,7 +115,7 @@ public void OpenGenericType ()
Assert.AreEqual (module, type.Module);
Assert.AreEqual ("System.Collections.Generic", type.Namespace);
Assert.AreEqual ("Dictionary`2", type.Name);
Assert.IsInstanceOfType (typeof (TypeReference), type);
Assert.IsInstanceOf (typeof (TypeReference), type);
Assert.AreEqual (2, type.GenericParameters.Count);
}

Expand Down Expand Up @@ -156,7 +156,7 @@ public void TripleNestedTypeWithScope ()
Assert.AreEqual (module, type.Module);
Assert.AreEqual ("", type.Namespace);
Assert.AreEqual ("Baz`1", type.Name);
Assert.IsInstanceOfType (typeof (TypeReference), type);
Assert.IsInstanceOf (typeof (TypeReference), type);
Assert.AreEqual (1, type.GenericParameters.Count);

type = type.DeclaringType;
Expand All @@ -166,7 +166,7 @@ public void TripleNestedTypeWithScope ()
Assert.AreEqual (module, type.Module);
Assert.AreEqual ("", type.Namespace);
Assert.AreEqual ("Bar`1", type.Name);
Assert.IsInstanceOfType (typeof (TypeReference), type);
Assert.IsInstanceOf (typeof (TypeReference), type);
Assert.AreEqual (1, type.GenericParameters.Count);

type = type.DeclaringType;
Expand All @@ -176,7 +176,7 @@ public void TripleNestedTypeWithScope ()
Assert.AreEqual (module, type.Module);
Assert.AreEqual ("Bingo", type.Namespace);
Assert.AreEqual ("Foo`1", type.Name);
Assert.IsInstanceOfType (typeof (TypeReference), type);
Assert.IsInstanceOf (typeof (TypeReference), type);
Assert.AreEqual (1, type.GenericParameters.Count);
}

Expand All @@ -203,7 +203,7 @@ public void Vector ()
Assert.AreEqual (module, type.Module);
Assert.AreEqual ("Bingo", type.Namespace);
Assert.AreEqual ("Gazonk", type.Name);
Assert.IsInstanceOfType (typeof (TypeReference), type);
Assert.IsInstanceOf (typeof (TypeReference), type);
}

[Test]
Expand All @@ -227,7 +227,7 @@ public void ThreeDimensionalArray ()
Assert.AreEqual (module, type.Module);
Assert.AreEqual ("Bingo", type.Namespace);
Assert.AreEqual ("Gazonk", type.Name);
Assert.IsInstanceOfType (typeof (TypeReference), type);
Assert.IsInstanceOf (typeof (TypeReference), type);
}

[Test]
Expand Down Expand Up @@ -290,7 +290,7 @@ public void GenericInstanceMixedArguments ()
Assert.AreEqual (2, type.GenericParameters.Count);

var argument = instance.GenericArguments [0];
Assert.IsInstanceOfType (typeof (TypeDefinition), argument);
Assert.IsInstanceOf (typeof (TypeDefinition), argument);
Assert.AreEqual (module, argument.Module);
Assert.AreEqual ("Mono.Cecil.Tests", argument.Namespace);
Assert.AreEqual ("TypeParserTests", argument.Name);
Expand Down Expand Up @@ -332,13 +332,13 @@ public void GenericInstanceTwoNonFqArguments ()
Assert.AreEqual (module, argument.Module);
Assert.AreEqual ("", argument.Namespace);
Assert.AreEqual ("Bar", argument.Name);
Assert.IsInstanceOfType (typeof (TypeDefinition), argument);
Assert.IsInstanceOf (typeof (TypeDefinition), argument);

argument = instance.GenericArguments [1];
Assert.AreEqual (module, argument.Module);
Assert.AreEqual ("", argument.Namespace);
Assert.AreEqual ("Bar", argument.Name);
Assert.IsInstanceOfType (typeof (TypeDefinition), argument);
Assert.IsInstanceOf (typeof (TypeDefinition), argument);
}

[Test]
Expand Down Expand Up @@ -376,13 +376,13 @@ public void ComplexGenericInstanceMixedArguments ()
Assert.AreEqual (2, instance.GenericArguments.Count);
Assert.AreEqual (module, instance.Module);
Assert.AreEqual ("Mono.Cecil.Tests.TypeParserTests/Foo`2", instance.ElementType.FullName);
Assert.IsInstanceOfType (typeof (TypeDefinition), instance.ElementType);
Assert.IsInstanceOf (typeof (TypeDefinition), instance.ElementType);

argument = instance.GenericArguments [0];
Assert.AreEqual (module, argument.Module);
Assert.AreEqual ("Mono.Cecil.Tests", argument.Namespace);
Assert.AreEqual ("TypeParserTests", argument.Name);
Assert.IsInstanceOfType (typeof (TypeDefinition), argument);
Assert.IsInstanceOf (typeof (TypeDefinition), argument);

argument = instance.GenericArguments [1];
Assert.AreEqual ("mscorlib", argument.Scope.Name);
Expand Down
Binary file removed Test/libs/nunit-2.4.8/nunit.core.dll
Binary file not shown.
Binary file removed Test/libs/nunit-2.4.8/nunit.core.interfaces.dll
Binary file not shown.
Binary file removed Test/libs/nunit-2.4.8/nunit.framework.dll
Binary file not shown.
Binary file added Test/libs/nunit-2.5.10/nunit.core.dll
Binary file not shown.
Binary file not shown.
Binary file added Test/libs/nunit-2.5.10/nunit.framework.dll
Binary file not shown.
12 changes: 6 additions & 6 deletions rocks/Test/Mono.Cecil.Rocks.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.core, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.core, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Test\libs\nunit-2.4.8\nunit.core.dll</HintPath>
<HintPath>..\..\Test\libs\nunit-2.5.10\nunit.core.dll</HintPath>
</Reference>
<Reference Include="nunit.core.interfaces, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.core.interfaces, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Test\libs\nunit-2.4.8\nunit.core.interfaces.dll</HintPath>
<HintPath>..\..\Test\libs\nunit-2.5.10\nunit.core.interfaces.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.framework, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Test\libs\nunit-2.4.8\nunit.framework.dll</HintPath>
<HintPath>..\..\Test\libs\nunit-2.5.10\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
Expand Down
18 changes: 9 additions & 9 deletions rocks/Test/Mono.Cecil.Tests/TypeReferenceRocksTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void MakeArrayType ()

var string_array = @string.MakeArrayType ();

Assert.IsInstanceOfType (typeof (ArrayType), string_array);
Assert.IsInstanceOf (typeof (ArrayType), string_array);
Assert.AreEqual (1, string_array.Rank);
}

Expand All @@ -27,7 +27,7 @@ public void MakeArrayTypeRank ()

var string_array = @string.MakeArrayType (3);

Assert.IsInstanceOfType (typeof (ArrayType), string_array);
Assert.IsInstanceOf (typeof (ArrayType), string_array);
Assert.AreEqual (3, string_array.Rank);
}

Expand All @@ -38,7 +38,7 @@ public void MakePointerType ()

var string_ptr = @string.MakePointerType ();

Assert.IsInstanceOfType (typeof (PointerType), string_ptr);
Assert.IsInstanceOf (typeof (PointerType), string_ptr);
}

[Test]
Expand All @@ -48,7 +48,7 @@ public void MakeByReferenceType ()

var string_byref = @string.MakeByReferenceType ();

Assert.IsInstanceOfType (typeof (ByReferenceType), string_byref);
Assert.IsInstanceOf (typeof (ByReferenceType), string_byref);
}

class OptionalModifier {}
Expand All @@ -61,7 +61,7 @@ public void MakeOptionalModifierType ()

var string_modopt = @string.MakeOptionalModifierType (modopt);

Assert.IsInstanceOfType (typeof (OptionalModifierType), string_modopt);
Assert.IsInstanceOf (typeof (OptionalModifierType), string_modopt);
Assert.AreEqual (modopt, string_modopt.ModifierType);
}

Expand All @@ -75,7 +75,7 @@ public void MakeRequiredModifierType ()

var string_modreq = @string.MakeRequiredModifierType (modreq);

Assert.IsInstanceOfType (typeof (RequiredModifierType), string_modreq);
Assert.IsInstanceOf (typeof (RequiredModifierType), string_modreq);
Assert.AreEqual (modreq, string_modreq.ModifierType);
}

Expand All @@ -86,7 +86,7 @@ public void MakePinnedType ()

var pinned_byte_array = byte_array.MakePinnedType ();

Assert.IsInstanceOfType (typeof (PinnedType), pinned_byte_array);
Assert.IsInstanceOf (typeof (PinnedType), pinned_byte_array);
}

[Test]
Expand All @@ -96,7 +96,7 @@ public void MakeSentinelType ()

var string_sentinel = @string.MakeSentinelType ();

Assert.IsInstanceOfType (typeof (SentinelType), string_sentinel);
Assert.IsInstanceOf (typeof (SentinelType), string_sentinel);
}

class Foo<T1, T2> {}
Expand All @@ -110,7 +110,7 @@ public void MakeGenericInstanceType ()

var foo_string_int = foo.MakeGenericInstanceType (@string, @int);

Assert.IsInstanceOfType (typeof (GenericInstanceType), foo_string_int);
Assert.IsInstanceOf (typeof (GenericInstanceType), foo_string_int);
Assert.AreEqual (2, foo_string_int.GenericArguments.Count);
Assert.AreEqual (@string, foo_string_int.GenericArguments [0]);
Assert.AreEqual (@int, foo_string_int.GenericArguments [1]);
Expand Down
12 changes: 6 additions & 6 deletions symbols/mdb/Test/Mono.Cecil.Mdb.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@
<Content Include="Resources\assemblies\hello.exe.mdb" />
</ItemGroup>
<ItemGroup>
<Reference Include="nunit.core, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.core, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Test\libs\nunit-2.4.8\nunit.core.dll</HintPath>
<HintPath>..\..\..\Test\libs\nunit-2.5.10\nunit.core.dll</HintPath>
</Reference>
<Reference Include="nunit.core.interfaces, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.core.interfaces, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Test\libs\nunit-2.4.8\nunit.core.interfaces.dll</HintPath>
<HintPath>..\..\..\Test\libs\nunit-2.5.10\nunit.core.interfaces.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.framework, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Test\libs\nunit-2.4.8\nunit.framework.dll</HintPath>
<HintPath>..\..\..\Test\libs\nunit-2.5.10\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
12 changes: 6 additions & 6 deletions symbols/pdb/Test/Mono.Cecil.Pdb.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@
<Content Include="Resources\assemblies\test.pdb" />
</ItemGroup>
<ItemGroup>
<Reference Include="nunit.core, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.core, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Test\libs\nunit-2.4.8\nunit.core.dll</HintPath>
<HintPath>..\..\..\Test\libs\nunit-2.5.10\nunit.core.dll</HintPath>
</Reference>
<Reference Include="nunit.core.interfaces, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.core.interfaces, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Test\libs\nunit-2.4.8\nunit.core.interfaces.dll</HintPath>
<HintPath>..\..\..\Test\libs\nunit-2.5.10\nunit.core.interfaces.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<Reference Include="nunit.framework, Version=2.5.10.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Test\libs\nunit-2.4.8\nunit.framework.dll</HintPath>
<HintPath>..\..\..\Test\libs\nunit-2.5.10\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down

0 comments on commit ecdd745

Please sign in to comment.