From 75c31034504770b9d3b10d38bc0072116b73bf23 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 21 Nov 2018 17:36:22 +0100 Subject: [PATCH] Suppress warnings in "invalid" test cases. --- .../TestCases/Pretty/CS6_StringInterpolation.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS6_StringInterpolation.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS6_StringInterpolation.cs index 027fd1ff0..b82bd474b 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS6_StringInterpolation.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS6_StringInterpolation.cs @@ -29,6 +29,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty public static void InvalidFormatString(string[] args) { +#pragma warning disable IDE0043 Console.WriteLine(string.Format("", args.Length)); Console.WriteLine(string.Format("a", args.Length)); Console.WriteLine(string.Format("}", args.Length)); @@ -53,6 +54,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty Console.WriteLine(string.Format("{0:}", args.Length)); Console.WriteLine(string.Format("{0{a}0}", args.Length)); Console.WriteLine(string.Format("test: {0}", string.Join(",", args))); +#pragma warning restore } public void FormattableStrings(FormattableString s, string[] args)