diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-09-02 16:43:58 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-10-29 15:09:38 +0300 |
commit | fbf1acd6982aa19951e01d999d226e36b1bf21aa (patch) | |
tree | 52a1dbc0bd6386abe26b26488c1228cf43193441 /mcs/class/System.XML | |
parent | 40c3407ab94ccaf31a9b57ee106de2de61604ee3 (diff) |
[System.Xml] Fix embedded assembly name in XmlCodeExporterTests
nunitlite doesn't run the test in a separate AppDomain so we get the name of the console host.
Diffstat (limited to 'mcs/class/System.XML')
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs | 69 |
1 files changed, 30 insertions, 39 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 661273a3bf7..e8bdfd8829c 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs @@ -46,7 +46,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format(CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -64,7 +64,7 @@ namespace MonoTests.System.XmlSerialization " this.namesField = value;{0}" + " }}{0}" + " }}{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); + "}}{0}", Environment.NewLine), sw.ToString (), "#2"); codeNamespace = ExportCode (typeof (ArrayClass[])); @@ -76,7 +76,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -93,7 +93,7 @@ namespace MonoTests.System.XmlSerialization " this.namesField = value;{0}" + " }}{0}" + " }}{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#4"); + "}}{0}", Environment.NewLine), sw.ToString (), "#4"); } [Test] @@ -110,7 +110,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -128,7 +128,7 @@ namespace MonoTests.System.XmlSerialization " this.itemsField = value;{0}" + " }}{0}" + " }}{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); + "}}{0}", Environment.NewLine), sw.ToString (), "#2"); } [Test] @@ -145,7 +145,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -163,7 +163,7 @@ namespace MonoTests.System.XmlSerialization " this.cdataField = value;{0}" + " }}{0}" + " }}{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); + "}}{0}", Environment.NewLine), sw.ToString (), "#2"); } [Test] @@ -182,7 +182,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -204,7 +204,7 @@ namespace MonoTests.System.XmlSerialization " this.myChoiceField = value;{0}" + " }}{0}" + " }}{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); + "}}{0}", Environment.NewLine), sw.ToString (), "#2"); } [Test] @@ -222,7 +222,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -403,7 +403,7 @@ namespace MonoTests.System.XmlSerialization "{0}" + "/// <remarks/>{0}" + "[System.FlagsAttribute()]{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "public enum MapModifiers {{{0}" + " {0}" + @@ -414,7 +414,7 @@ namespace MonoTests.System.XmlSerialization " /// <remarks/>{0}" + " [System.Xml.Serialization.XmlEnumAttribute(\"protected\")]{0}" + " Protected = 2,{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); + "}}{0}", Environment.NewLine), sw.ToString (), "#2"); } [Test] @@ -431,7 +431,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Xml.Serialization.XmlTypeAttribute(IncludeInSchema=false)]{0}" + "[System.Xml.Serialization.XmlRootAttribute(Namespace=\"\", IsNullable=false)]{0}" + @@ -446,7 +446,7 @@ namespace MonoTests.System.XmlSerialization " {0}" + " /// <remarks/>{0}" + " ChoiceTwo,{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); + "}}{0}", Environment.NewLine), sw.ToString (), "#2"); codeNamespace = ExportCode (typeof (ItemChoiceType[])); Assert.IsNotNull (codeNamespace, "#3"); @@ -457,7 +457,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Xml.Serialization.XmlTypeAttribute(IncludeInSchema=false)]{0}" + "public enum ItemChoiceType {{{0}" + @@ -471,7 +471,7 @@ namespace MonoTests.System.XmlSerialization " {0}" + " /// <remarks/>{0}" + " ChoiceTwo,{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#4"); + "}}{0}", Environment.NewLine), sw.ToString (), "#4"); } [Test] @@ -488,7 +488,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -509,7 +509,7 @@ namespace MonoTests.System.XmlSerialization "}}{0}" + "{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -526,7 +526,7 @@ namespace MonoTests.System.XmlSerialization " this.somethingField = value;{0}" + " }}{0}" + " }}{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); + "}}{0}", Environment.NewLine), sw.ToString (), "#2"); } [Test] @@ -544,7 +544,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -578,7 +578,7 @@ namespace MonoTests.System.XmlSerialization "}}{0}" + "{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -667,7 +667,7 @@ namespace MonoTests.System.XmlSerialization "{0}" + "/// <remarks/>{0}" + "[System.FlagsAttribute()]{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Xml.Serialization.XmlTypeAttribute(Namespace=\"some:urn\")]{0}" + "public enum FlagEnum {{{0}" + @@ -786,7 +786,7 @@ namespace MonoTests.System.XmlSerialization "{0}" + "/// <remarks/>{0}" + "[System.FlagsAttribute()]{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Xml.Serialization.XmlTypeAttribute(Namespace=\"urn:myNS\")]{0}" + "public enum FlagEnum {{{0}" + @@ -806,7 +806,7 @@ namespace MonoTests.System.XmlSerialization "{0}" + "/// <remarks/>{0}" + "[System.FlagsAttribute()]{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Xml.Serialization.XmlTypeAttribute(Namespace=\"urn:myNS\")]{0}" + "public enum FlagEnum_Encoded {{{0}" + @@ -819,7 +819,7 @@ namespace MonoTests.System.XmlSerialization " {0}" + " /// <remarks/>{0}" + " e4 = 4,{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); + "}}{0}", Environment.NewLine), sw.ToString (), "#2"); } [Test] @@ -836,7 +836,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + "[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" + @@ -855,7 +855,7 @@ namespace MonoTests.System.XmlSerialization " this.somethingField = value;{0}" + " }}{0}" + " }}{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); + "}}{0}", Environment.NewLine), sw.ToString (), "#2"); } [Test] @@ -909,7 +909,7 @@ namespace MonoTests.System.XmlSerialization "{0}{0}" + "/// <remarks/>{0}" + "[System.FlagsAttribute()]{0}" + - "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + + "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Xml.Serialization.XmlRootAttribute(Namespace=\"\", IsNullable=false)]{0}" + "public enum ZeroFlagEnum {{{0}" + @@ -925,7 +925,7 @@ namespace MonoTests.System.XmlSerialization " /// <remarks/>{0}" + " [System.Xml.Serialization.XmlEnumAttribute(\"tns:t<w>o\")]{0}" + " e2 = 4,{0}" + - "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); + "}}{0}", Environment.NewLine), sw.ToString (), "#2"); } [Test] @@ -1005,15 +1005,6 @@ namespace MonoTests.System.XmlSerialization return codeNamespace; } - string XmlFileVersion { - get { - Assembly xmlAsm = typeof (XmlDocument).Assembly; - AssemblyFileVersionAttribute afv = (AssemblyFileVersionAttribute) - Attribute.GetCustomAttribute (xmlAsm, typeof (AssemblyFileVersionAttribute)); - return afv.Version; - } - } - [XmlRootAttribute ("root", Namespace="urn:aNS", IsNullable=false)] public class Root { |