Explorar o código

2003-11-21 Gonzalo Paniagua Javier <[email protected]>

	* System.CodeDom.Compiler/CodeGenerator.cs: fixed assembly level
	attribute generation.

	* Test/Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs: don't
	compare whitespace for assembly level attribute.

svn path=/trunk/mcs/; revision=20292
Gonzalo Paniagua Javier %!s(int64=22) %!d(string=hai) anos
pai
achega
5e99ee75fe

+ 6 - 2
mcs/class/System/System.CodeDom.Compiler/ChangeLog

@@ -1,7 +1,11 @@
+2003-11-21  Gonzalo Paniagua Javier <[email protected]>
+
+	* CodeGenerator.cs: fixed assembly level attribute generation.
+
 2003-08-08  Lluis Sanchez Gual  <[email protected]>
 
-	* CodeGenerator.cs: When sorting the members of a type, keep the relative
-	  order of the members of the same kind.
+	* CodeGenerator.cs: When sorting the members of a type, keep the
+	relative order of the members of the same kind.
 
 2003-08-05  Lluis Sanchez Gual  <[email protected]>
 

+ 6 - 4
mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs

@@ -172,10 +172,12 @@ namespace System.CodeDom.Compiler {
 
 			CodeAttributeDeclarationCollection attributes = compileUnit.AssemblyCustomAttributes;
 			if (attributes.Count != 0) {
-				GenerateAttributeDeclarationsStart (attributes);
-				output.Write ("assembly: ");
-				OutputAttributeDeclarations (compileUnit.AssemblyCustomAttributes);
-				GenerateAttributeDeclarationsEnd (attributes);
+				foreach (CodeAttributeDeclaration att in attributes) {
+					GenerateAttributeDeclarationsStart (attributes);
+					output.Write ("assembly: ");
+					OutputAttributeDeclaration (att);
+					GenerateAttributeDeclarationsEnd (attributes);
+				}
 			}
 
 			foreach (CodeNamespace ns in compileUnit.Namespaces)

+ 5 - 0
mcs/class/System/Test/Microsoft.CSharp/ChangeLog

@@ -1,3 +1,8 @@
+2003-11-21  Gonzalo Paniagua Javier <[email protected]>
+
+	* Test/Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs: don't
+	compare whitespace for assembly level attribute.
+
 2003-07-09  Gonzalo Paniagua Javier <[email protected]>
 
 	* system_linux_test.args: added new tests in Microsoft.CSharp.

+ 1 - 1
mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs

@@ -103,7 +103,7 @@ namespace MonoTests.Microsoft.CSharp
 
 			codeUnit.AssemblyCustomAttributes.Add (attrDec);
 			Generate ();
-			Assertion.AssertEquals ("[assembly: A()]\n\n", Code);
+			Assertion.AssertEquals ("[assembly: A()]", Code.Trim ());
 		}
 
 		/* FIXME