18 references to constantDeclaration
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (18)
Semantics\NativeIntegerTests.cs (18)
13129constantDeclaration(opType, declarations, expr, expectedResult, diagnostics); 13130constantDeclaration(opType, declarations, $"checked({expr})", expectedResult, diagnostics); 13131constantDeclaration(opType, declarations, $"unchecked({expr})", expectedResult, diagnostics); 13144constantDeclaration(opType, declarations, expr, null, 13149constantDeclaration(opType, declarations, $"checked({expr})", null, 13154constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"unchecked({expr})").WithArguments("Library.F") }); 13166constantDeclaration(opType, declarations, expr, null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, expr).WithArguments("Library.F") }); 13167constantDeclaration(opType, declarations, $"checked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"checked({expr})").WithArguments("Library.F") }); 13168constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"unchecked({expr})").WithArguments("Library.F") }); 13183constantDeclaration(opType, declarations, expr, expectedResult, diagnostics); 13184constantDeclaration(opType, declarations, $"checked({expr})", expectedResult, diagnostics); 13185constantDeclaration(opType, declarations, $"unchecked({expr})", expectedResult, diagnostics); 13198constantDeclaration(opType, declarations, expr, null, 13203constantDeclaration(opType, declarations, $"checked({expr})", null, 13208constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"unchecked({expr})").WithArguments("Library.F") }); 13220constantDeclaration(opType, declarations, expr, null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, expr).WithArguments("Library.F") }); 13221constantDeclaration(opType, declarations, $"checked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"checked({expr})").WithArguments("Library.F") }); 13222constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.ERR_NotConstantExpression, $"unchecked({expr})").WithArguments("Library.F") });