24 references to ERR_ErrorDirective
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
1164
or ErrorCode.
ERR_ErrorDirective
Parser\DirectiveParser.cs (1)
329
eod = this.AddError(eod, triviaOffset, triviaWidth, isError ? ErrorCode.
ERR_ErrorDirective
: ErrorCode.WRN_WarningDirective, errorText);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (22)
LexicalAndXml\DisabledRegionTests.cs (1)
28
Diagnostic(ErrorCode.
ERR_ErrorDirective
, @"""error2""").WithArguments(@"""error2"""));
LexicalAndXml\PreprocessorTests.cs (16)
2955
VerifyErrorSpecial(node, new DirectiveInfo { Number = (int)ErrorCode.
ERR_ErrorDirective
, Text = "#error: 'Your monkey is alive'" });
3111
VerifyErrorSpecial(node, new DirectiveInfo { Number = (int)ErrorCode.
ERR_ErrorDirective
, Text = "#error: ''" });
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) });
3216
Assert.Equal((int)ErrorCode.
ERR_ErrorDirective
, error.Code);
3244
Diagnostic(ErrorCode.
ERR_ErrorDirective
, "version").WithArguments("version").WithLocation(1, 8),
3267
Diagnostic(ErrorCode.
ERR_ErrorDirective
, "version:7.1").WithArguments("version:7.1"),
3290
Diagnostic(ErrorCode.
ERR_ErrorDirective
, "version:A.B").WithArguments("version:A.B").WithLocation(1, 8)
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: '\"\"\"'" });
Parsing\ParserErrorMessageTests.cs (3)
2623
ParseAndValidate(test, Diagnostic(ErrorCode.
ERR_ErrorDirective
, "(12345)").WithArguments("(12345)"));
2633
Assert.Equal((int)ErrorCode.
ERR_ErrorDirective
, error.Code);
4826
Diagnostic(ErrorCode.
ERR_ErrorDirective
, "").WithArguments(""));
Parsing\ParsingErrorRecoveryTests.cs (2)
8616
Diagnostic(ErrorCode.
ERR_ErrorDirective
, "E2").WithArguments("E2").WithLocation(3, 8),
8641
Diagnostic(ErrorCode.
ERR_ErrorDirective
, "E1").WithArguments("E1").WithLocation(201, 8));