41 writes to Number
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (41)
LexicalAndXml\PreprocessorTests.cs (41)
2863
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.WRN_WarningDirective, Text = "#warning: 'W1'" });
2955
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = "#error: 'Your monkey is alive'" });
2966
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.WRN_WarningDirective, Text = "#warning: 'Your monkey is alive'" });
3019
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.WRN_WarningDirective, Text = "#warning: 'W4'" });
3111
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = "#error: ''" });
3122
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.WRN_WarningDirective, Text = "#warning: ''" });
3133
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = "#error: 'abc def'" });
3144
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = "#error: 'abc def '" });
3155
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = "#error: '/*abc def*/ '" });
3166
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = "#error: '/*abc def*/ '" });
3177
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = "#error: '/*abc def '" });
3190
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = string.Format("#error: '{0}'", errorText) });
3301
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = "#error: '\"'" });
3312
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = "#error: '\"goo\"'" });
3323
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = "#error: '\"\"'" });
3334
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_ErrorDirective, Text = "#error: '\"\"\"'" });
3349
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= 1000 });
3359
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= 1000, Text = "bogus.cs" });
3369
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= -1 });
3380
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= -1 });
3390
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= -1 });
3400
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= -2 });
3411
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= -2 });
3421
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= -2 });
3465
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= 16707566, Text = "XYZ" });
3506
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= 1000 });
3516
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= 1000 });
3527
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= 1000, Text = "bogus.cs" });
3537
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= 12345, Text = "bogus.cs" });
3555
VerifyDirectivesSpecial(tree.GetCompilationUnitRoot(), new DirectiveInfo { Kind = SyntaxKind.LineDirectiveTrivia, Status = NodeStatus.IsActive,
Number
= 100, Text = "test.cs" });
3753
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.WRN_ErrorOverride, Status = NodeStatus.IsWarning });
3986
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.WRN_IdentifierOrNumericLiteralExpected, Status = NodeStatus.IsWarning }); // CS1072
4003
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.WRN_IllegalPPWarning, Status = NodeStatus.IsWarning }); // CS1634
4019
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.WRN_IllegalPPWarning, Status = NodeStatus.IsWarning }); // CS1634
4035
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.WRN_IllegalPPWarning, Status = NodeStatus.IsWarning }); // CS1634
4468
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_FeatureNotAvailableInVersion7_3, Status = NodeStatus.IsError });
4545
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_NullableDirectiveTargetExpected, Status = NodeStatus.IsError });
4581
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_NullableDirectiveQualifierExpected, Status = NodeStatus.IsError });
4592
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_NullableDirectiveTargetExpected, Status = NodeStatus.IsError });
4603
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_NullableDirectiveQualifierExpected, Status = NodeStatus.IsError });
4614
VerifyErrorSpecial(node, new DirectiveInfo {
Number
= (int)ErrorCode.ERR_NullableDirectiveQualifierExpected, Status = NodeStatus.IsError });
7 references to Number
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
LexicalAndXml\PreprocessorTests.cs (7)
225
if (exp.
Number
== -1)
230
else if (exp.
Number
== -2)
235
else if (exp.
Number
== 0)
239
else if (exp.
Number
> 0)
241
Assert.Equal(exp.
Number
, ld.Line.Value); // Number
242
Assert.Equal(exp.
Number
, Int32.Parse(ld.Line.Text));
417
Assert.Equal(expected.
Number
, actual.Code);