コード例 #1
0
        public void NonExpressionShouldProduceNoViolations(string displayName, SyntaxBase expression)
        {
            var diagnosticWriter = ToListDiagnosticWriter.Create();

            TypeValidator.GetCompileTimeConstantViolation(expression, diagnosticWriter);

            diagnosticWriter.GetDiagnostics().Should().BeEmpty();
        }
コード例 #2
0
        public void NonLiteralExpression_IsLiteralExpression_ShouldReturnViolations(string displayName, SyntaxBase expression)
        {
            var diagnosticWriter = ToListDiagnosticWriter.Create();

            TypeValidator.GetCompileTimeConstantViolation(expression, diagnosticWriter);

            diagnosticWriter.GetDiagnostics().Should().NotBeEmpty();
        }
コード例 #3
0
 public void NonExpressionShouldProduceNoViolations(string displayName, SyntaxBase expression)
 {
     TypeValidator.GetCompileTimeConstantViolation(expression).Should().BeEmpty();
 }
コード例 #4
0
 public void NonLiteralExpression_IsLiteralExpression_ShouldReturnViolations(string displayName, SyntaxBase expression)
 {
     TypeValidator.GetCompileTimeConstantViolation(expression).Should().NotBeEmpty();
 }