18 references to constantDeclaration
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (18)
Emit\NumericIntPtrTests.cs (18)
8913constantDeclaration(opType, declarations, expr, expectedResult, diagnostics);
8914constantDeclaration(opType, declarations, $"checked({expr})", expectedResult, diagnostics);
8915constantDeclaration(opType, declarations, $"unchecked({expr})", expectedResult, diagnostics);
8928constantDeclaration(opType, declarations, expr, null,
8933constantDeclaration(opType, declarations, $"checked({expr})", null,
8938constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"unchecked({expr})").WithArguments("Library.F") });
8950constantDeclaration(opType, declarations, expr, null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, expr).WithArguments("Library.F") });
8951constantDeclaration(opType, declarations, $"checked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"checked({expr})").WithArguments("Library.F") });
8952constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"unchecked({expr})").WithArguments("Library.F") });
8967constantDeclaration(opType, declarations, expr, expectedResult, diagnostics);
8968constantDeclaration(opType, declarations, $"checked({expr})", expectedResult, diagnostics);
8969constantDeclaration(opType, declarations, $"unchecked({expr})", expectedResult, diagnostics);
8982constantDeclaration(opType, declarations, expr, null,
8987constantDeclaration(opType, declarations, $"checked({expr})", null,
8992constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"unchecked({expr})").WithArguments("Library.F") });
9004constantDeclaration(opType, declarations, expr, null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, expr).WithArguments("Library.F") });
9005constantDeclaration(opType, declarations, $"checked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"checked({expr})").WithArguments("Library.F") });
9006constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"unchecked({expr})").WithArguments("Library.F") });