Browse Source

Add test for SD2-1110 (currently broken, let's see if the build server catches unit test errors)

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2101 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
19a53c7f2c
  1. 18
      src/Libraries/NRefactory/Test/Parser/GlobalScope/AttributeSectionTests.cs

18
src/Libraries/NRefactory/Test/Parser/GlobalScope/AttributeSectionTests.cs

@ -71,5 +71,23 @@ public class Form1 { @@ -71,5 +71,23 @@ public class Form1 {
Assert.AreEqual("Microsoft.VisualBasic.CompilerServices.DesignerGenerated", decl.Attributes[0].Attributes[0].Name);
Assert.AreEqual("someprefix.DesignerGenerated", decl.Attributes[1].Attributes[0].Name);
}
[Test]
public void AssemblyAttributeCSharp()
{
string program = @"[assembly: System.Attribute()]";
AttributeSection decl = ParseUtilCSharp.ParseGlobal<AttributeSection>(program);
Assert.AreEqual(new Location(1, 1), decl.StartLocation);
Assert.AreEqual("assembly", decl.AttributeTarget);
}
[Test]
public void AssemblyAttributeVBNet()
{
string program = @"<assembly: System.Attribute()>";
AttributeSection decl = ParseUtilVBNet.ParseGlobal<AttributeSection>(program);
Assert.AreEqual(new Location(1, 1), decl.StartLocation);
Assert.AreEqual("assembly", decl.AttributeTarget);
}
}
}

Loading…
Cancel
Save