Browse Source

Add #pragma to suppress warning in test case

pull/512/head
Schabse Laks 11 years ago committed by SLaks
parent
commit
be718680fe
  1. 3
      ICSharpCode.Decompiler/Tests/CodeSampleFileParser.cs
  2. 2
      ICSharpCode.Decompiler/Tests/Types/S_TypeMemberDeclarations.cs

3
ICSharpCode.Decompiler/Tests/CodeSampleFileParser.cs

@ -87,7 +87,8 @@ namespace ICSharpCode.Decompiler.Tests
{ {
if(String.IsNullOrWhiteSpace(s)) if(String.IsNullOrWhiteSpace(s))
return true; return true;
return s.Trim().StartsWith("//"); s = s.Trim();
return s.StartsWith("//") || s.StartsWith("#"); // Also ignore #pragmas for warning suppression
} }
public static string ConcatLines(IEnumerable<string> lines) public static string ConcatLines(IEnumerable<string> lines)

2
ICSharpCode.Decompiler/Tests/Types/S_TypeMemberDeclarations.cs

@ -664,7 +664,9 @@ namespace HideMembers3
} }
public class J2 : J public class J2 : J
{ {
#pragma warning disable 0108 // Deliberate bad code for test case
public int get_P; public int get_P;
#pragma warning restore 0108
} }
} }
//$$ HideMembers4 //$$ HideMembers4

Loading…
Cancel
Save