You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
committed by
Jo Shields
parent
aa7da660d6
commit
c042cd0c52
@ -2,7 +2,7 @@
|
||||
// Microsoft.VisualBasic.* Test Cases
|
||||
//
|
||||
// Authors:
|
||||
// Gert Driesen (drieseng@users.sourceforge.net)
|
||||
// Gert Driesen (drieseng@users.sourceforge.net)
|
||||
//
|
||||
// (c) 2005 Novell
|
||||
//
|
||||
@ -154,6 +154,40 @@ namespace MonoTests.Microsoft.VisualBasic
|
||||
+ "Namespace{0}", NewLine), Generate ());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AttributeAndImportsTest ()
|
||||
{
|
||||
CodeNamespace ns = new CodeNamespace ();
|
||||
codeUnit.Namespaces.Add (ns);
|
||||
ns.Imports.Add(new CodeNamespaceImport("System"));
|
||||
ns.Imports.Add(new CodeNamespaceImport("System.Reflection"));
|
||||
|
||||
CodeAttributeDeclaration attrDec = new CodeAttributeDeclaration ();
|
||||
attrDec.Name = "A";
|
||||
codeUnit.AssemblyCustomAttributes.Add (attrDec);
|
||||
|
||||
Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
|
||||
"Imports System{0}Imports System.Reflection{0}<Assembly: A()> {0}{0}",
|
||||
NewLine), Generate ());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AttributeAndImportsAndNamespaceTest ()
|
||||
{
|
||||
CodeNamespace ns = new CodeNamespace ("A");
|
||||
codeUnit.Namespaces.Add (ns);
|
||||
ns.Imports.Add(new CodeNamespaceImport("System"));
|
||||
ns.Imports.Add(new CodeNamespaceImport("System.Reflection"));
|
||||
|
||||
CodeAttributeDeclaration attrDec = new CodeAttributeDeclaration ();
|
||||
attrDec.Name = "A";
|
||||
codeUnit.AssemblyCustomAttributes.Add (attrDec);
|
||||
|
||||
Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
|
||||
"Imports System{0}Imports System.Reflection{0}<Assembly: A()> {0}{0}"
|
||||
+ "Namespace A{0}End Namespace{0}", NewLine), Generate ());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CodeSnippetTest ()
|
||||
{
|
||||
|
Reference in New Issue
Block a user