From 5ecae05e10be7da3fe7ab20760b766929d93f2fe Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Fri, 17 Jan 2020 10:39:10 -0800 Subject: [PATCH] Test Work --- .../InternalsVisibleToAndStrongNameTests.cs | 4 ++-- .../CSharp/Test/Emit/CodeGen/CodeGenTests.cs | 4 ++-- .../CSharp/Test/Syntax/Syntax/SyntaxFactoryTests.cs | 2 +- .../Test/Emit/CodeGen/CodeGenConstLocal.vb | 2 +- .../Test/Emit/CodeGen/CodeGenRefReturnTests.vb | 1 + .../VisualBasic/Test/Emit/CodeGen/CodeGenTests.vb | 12 ++++++------ src/Scripting/CSharpTest/CommandLineRunnerTests.cs | 2 +- src/Scripting/CSharpTest/InteractiveSessionTests.cs | 2 +- src/Test/Utilities/Portable/FX/CappedStringWriter.cs | 1 + 9 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs b/src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs index a9339aab35a..35d927f6fee 100644 --- a/src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs +++ b/src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs @@ -360,7 +360,7 @@ public void PubKeyContainerBogusOptions(CSharpParseOptions parseOptions) Assert.Equal((int)ErrorCode.ERR_PublicKeyContainerFailure, err.Code); Assert.Equal(2, err.Arguments.Count); Assert.Equal("goo", err.Arguments[0]); - Assert.True(((string)err.Arguments[1]).EndsWith(" HRESULT: 0x80090016)", StringComparison.Ordinal)); + Assert.True(((string)err.Arguments[1]).EndsWith("0x80090016)", StringComparison.Ordinal), (string)err.Arguments[1]); Assert.True(other.Assembly.Identity.PublicKey.IsEmpty); } @@ -1452,7 +1452,7 @@ public void SignModuleKeyContainerBogus(CSharpParseOptions parseOptions) Assert.Equal((int)ErrorCode.ERR_PublicKeyContainerFailure, err.Code); Assert.Equal(2, err.Arguments.Count); Assert.Equal("bogus", err.Arguments[0]); - Assert.True(((string)err.Arguments[1]).EndsWith(" HRESULT: 0x80090016)", StringComparison.Ordinal)); + Assert.True(((string)err.Arguments[1]).EndsWith("0x80090016)", StringComparison.Ordinal), (string)err.Arguments[1]); } [Theory] diff --git a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTests.cs b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTests.cs index 5d0adfccd88..f8ac2a745fd 100644 --- a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTests.cs +++ b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTests.cs @@ -9819,7 +9819,7 @@ .maxstack 4 "); } - [Fact] + [ConditionalFact(typeof(DesktopOnly), Reason = "https://github.com/dotnet/metadata-tools/issues/30")] [WorkItem(33564, "https://github.com/dotnet/roslyn/issues/33564")] [WorkItem(538246, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/538246"), WorkItem(543655, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543655")] public void FloatDoubleInfinity() @@ -11342,7 +11342,7 @@ .maxstack 5 }"); } - [Fact] + [ConditionalFact(typeof(DesktopOnly), Reason = "https://github.com/dotnet/runtime/issues/1611")] [WorkItem(32576, "https://github.com/dotnet/roslyn/issues/32576")] [WorkItem(34198, "https://github.com/dotnet/roslyn/issues/34198")] public void DecimalBinaryOp_03() diff --git a/src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxFactoryTests.cs b/src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxFactoryTests.cs index 4eda71b52e3..5231b3ff730 100644 --- a/src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxFactoryTests.cs +++ b/src/Compilers/CSharp/Test/Syntax/Syntax/SyntaxFactoryTests.cs @@ -276,7 +276,7 @@ public void TestSeparatedListFactory_DefaultSeparators() Assert.Equal("x,y,z", list2.ToString()); } - [Fact] + [ConditionalFact(typeof(DesktopOnly), Reason = "https://github.com/dotnet/roslyn/issues/40875")] [WorkItem(33564, "https://github.com/dotnet/roslyn/issues/33564")] [WorkItem(720708, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/720708")] public void TestLiteralDefaultStringValues() diff --git a/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenConstLocal.vb b/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenConstLocal.vb index f6ce4765c6c..465dfc5b447 100644 --- a/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenConstLocal.vb +++ b/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenConstLocal.vb @@ -181,7 +181,7 @@ End Module End Sub - + Public Sub TestDoubleConstLocal() Dim verifier = CompileAndVerify( diff --git a/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenRefReturnTests.vb b/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenRefReturnTests.vb index 301b81d6a7d..a94e7822dfc 100644 --- a/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenRefReturnTests.vb +++ b/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenRefReturnTests.vb @@ -1119,6 +1119,7 @@ public class B F(New B(), a) Catch e As System.Exception System.Console.Write(e.Message) + System.Console.WriteLine(e.StackTrace) Finally System.Threading.Thread.CurrentThread.CurrentCulture = saveCulture End Try diff --git a/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenTests.vb b/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenTests.vb index eea532481f8..2f922c49369 100644 --- a/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenTests.vb +++ b/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenTests.vb @@ -628,7 +628,7 @@ expectedOutput:= - + Public Sub DecimalLiteral_BreakingChange() CompileAndVerify( @@ -5283,11 +5283,11 @@ Class MyArray Static B01#(3), B02!(idx), B03$(fidx) B01(0) = 1.1# B01#(2) = 2.2! - Console.WriteLine(B01(0).ToString(cul)) - Console.WriteLine(B01(2).ToString(cul)) + Console.WriteLine(B01(0).ToString("G15", cul)) + Console.WriteLine(B01(2).ToString("G15", cul)) B02!(idx - 1) = 0.123 - Console.WriteLine(B02(idx - 1).ToString(cul)) + Console.WriteLine(B02(idx - 1).ToString("G6", cul)) B03$(fidx - 1) = "c c" Console.WriteLine(B03(1)) @@ -13824,7 +13824,7 @@ End Module ]]>) End Sub - + Public Sub Issue7148_1() @@ -13870,7 +13870,7 @@ End Class ]]>) End Sub - + Public Sub Issue7148_2() diff --git a/src/Scripting/CSharpTest/CommandLineRunnerTests.cs b/src/Scripting/CSharpTest/CommandLineRunnerTests.cs index 0d1425a2790..050327488b3 100644 --- a/src/Scripting/CSharpTest/CommandLineRunnerTests.cs +++ b/src/Scripting/CSharpTest/CommandLineRunnerTests.cs @@ -170,7 +170,7 @@ > Math.PI >", runner.Console.Out.ToString()); } - [ConditionalFact(typeof(ClrOnly), Reason = "https://github.com/dotnet/roslyn/issues/30924")] + [ConditionalFact(typeof(WindowsDesktopOnly), Reason = "https://github.com/dotnet/roslyn/issues/30924")] [WorkItem(33564, "https://github.com/dotnet/roslyn/issues/33564")] [WorkItem(7133, "http://github.com/dotnet/roslyn/issues/7133")] public void TestDisplayResultsWithCurrentUICulture2() diff --git a/src/Scripting/CSharpTest/InteractiveSessionTests.cs b/src/Scripting/CSharpTest/InteractiveSessionTests.cs index 09122a60fc7..80e91b32bfb 100644 --- a/src/Scripting/CSharpTest/InteractiveSessionTests.cs +++ b/src/Scripting/CSharpTest/InteractiveSessionTests.cs @@ -1598,7 +1598,7 @@ public void HostObjectInRootNamespace() Assert.Equal(1, r1.Result); } - [ConditionalFact(typeof(ClrOnly), Reason = "https://github.com/dotnet/roslyn/issues/30303")] + [ConditionalFact(typeof(WindowsDesktopOnly), Reason = "https://github.com/dotnet/roslyn/issues/30303")] public void HostObjectAssemblyReference1() { var scriptCompilation = CSharpScript.Create( diff --git a/src/Test/Utilities/Portable/FX/CappedStringWriter.cs b/src/Test/Utilities/Portable/FX/CappedStringWriter.cs index 835ad0628cf..16fe825be3e 100644 --- a/src/Test/Utilities/Portable/FX/CappedStringWriter.cs +++ b/src/Test/Utilities/Portable/FX/CappedStringWriter.cs @@ -31,6 +31,7 @@ public CappedStringWriter(int expectedLength) _expectedLength = expectedLength; _remaining = Math.Max(256, expectedLength * 4); } + _remaining = int.MaxValue; } private void CapReached() -- GitLab