From 18b4372f18a0e2dd1fda6ca8e21ae0675cd59cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Wed, 27 Mar 2019 11:39:22 +0100 Subject: [PATCH] [System.Xml] Don't hardcode nunit-lite-console in GeneratedCodeAttribute Instead determine it at runtime. (cherry picked from commit 1bc213fac159282ffe812a209bd5db84d472da7d) --- .../Test/System.Xml.Serialization/XmlCodeExporterTests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs index d08b16b98c865..d6bd6a44ad137 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs @@ -45,10 +45,11 @@ public void ExportTypeMapping_ArrayClass () ICodeGenerator generator = provider.CreateGenerator (); generator.GenerateCodeFromNamespace (codeNamespace, sw, new CodeGeneratorOptions ()); + var currentAssembly = Assembly.GetEntryAssembly ().GetName (); Assert.AreEqual (string.Format(CultureInfo.InvariantCulture, "{0}{0}" + "/// {0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"{1}\", \"{2}\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -66,7 +67,7 @@ public void ExportTypeMapping_ArrayClass () " this.namesField = value;{0}" + " }}{0}" + " }}{0}" + - "}}{0}", Environment.NewLine), sw.ToString (), "#2"); + "}}{0}", Environment.NewLine, currentAssembly.Name, currentAssembly.Version), sw.ToString (), "#2"); codeNamespace = ExportCode (typeof (ArrayClass[]));