Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5298 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61pull/1/head
5 changed files with 61 additions and 14 deletions
@ -1,10 +0,0 @@ |
|||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||||
<PropertyGroup> |
|
||||||
<LastOpenVersion>8.0.50215</LastOpenVersion> |
|
||||||
</PropertyGroup> |
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
||||||
<StartAction>Program</StartAction> |
|
||||||
<StartProgram>D:\Corsavy\SharpDevelop\bin\SharpDevelop.exe</StartProgram> |
|
||||||
<StartArguments>D:\Corsavy\SharpDevelop\src\Libraries\NRefactory\NRefactory.sln</StartArguments> |
|
||||||
</PropertyGroup> |
|
||||||
</Project> |
|
@ -0,0 +1,33 @@ |
|||||||
|
// <file>
|
||||||
|
// <copyright see="prj:///doc/copyright.txt"/>
|
||||||
|
// <license see="prj:///doc/license.txt"/>
|
||||||
|
// <owner name="Daniel Grunwald"/>
|
||||||
|
// <version>$Revision$</version>
|
||||||
|
// </file>
|
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.CodeDom; |
||||||
|
using ICSharpCode.NRefactory.Ast; |
||||||
|
using ICSharpCode.NRefactory.Visitors; |
||||||
|
using NUnit.Framework; |
||||||
|
|
||||||
|
namespace ICSharpCode.NRefactory.Tests.Output.CodeDOM.Tests |
||||||
|
{ |
||||||
|
[TestFixture] |
||||||
|
public class CodeDOMTypeReferenceTest |
||||||
|
{ |
||||||
|
[TestAttribute] |
||||||
|
public void InnerClassTypeReferencTest() |
||||||
|
{ |
||||||
|
InnerClassTypeReference ictr = new InnerClassTypeReference( |
||||||
|
new TypeReference("OuterClass", new List<TypeReference> { new TypeReference("String") }), |
||||||
|
"InnerClass", |
||||||
|
new List<TypeReference> { new TypeReference("Int32"), new TypeReference("Int64") }); |
||||||
|
Assert.AreEqual("OuterClass<String>+InnerClass<Int32,Int64>", ictr.ToString()); |
||||||
|
CodeTypeOfExpression result = (CodeTypeOfExpression)new TypeOfExpression(ictr).AcceptVisitor(new CodeDomVisitor(), null); |
||||||
|
Assert.AreEqual("OuterClass`1+InnerClass`2", result.Type.BaseType); |
||||||
|
Assert.AreEqual(3, result.Type.TypeArguments.Count); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue