-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
Copy pathCanWarnAsError.cs
37 lines (35 loc) · 997 Bytes
/
CanWarnAsError.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Warnings
{
[ExpectNonZeroExitCode (1)]
[SkipKeptItemsValidation]
[SetupLinkerSubstitutionFile ("CanWarnAsErrorSubstitutions.xml")]
[SetupLinkerArgument ("--verbose")]
[SetupLinkerArgument ("--warnaserror-")]
[SetupLinkerArgument ("--warnaserror+", "IL2011,IgnoreThis")]
[SetupLinkerArgument ("--warnaserror", "IL2012,CS4321,IgnoreThisToo")]
[SetupLinkerArgument ("--warnaserror", "IL2010")]
[SetupLinkerArgument ("--warnaserror-", "IL2010")]
[LogContains ("warning IL2007")]
[LogContains ("warning IL2008")]
[LogContains ("warning IL2009")]
[LogContains ("warning IL2010")]
[LogContains ("error IL2011")]
[LogContains ("error IL2012")]
[NoLinkedOutput]
public class CanWarnAsError
{
public static void Main ()
{
}
class HelperClass
{
private int helperField = 0;
int HelperMethod ()
{
return 0;
}
}
}
}