#develop (short for SharpDevelop) is a free IDE for .NET programming languages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

38 lines
1.2 KiB

// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.IO;
using NUnit.Framework;
using ICSharpCode.NRefactory.VB.Parser;
using ICSharpCode.NRefactory.VB.Dom;
namespace ICSharpCode.NRefactory.VB.Tests.Dom
{
[TestFixture]
public class CheckedStatementTests
{
#region C#
[Test]
public void CSharpCheckedStatementTest()
{
CheckedStatement checkedStatement = ParseUtilCSharp.ParseStatement<CheckedStatement>("checked { }");
Assert.IsFalse(checkedStatement.Block.IsNull);
}
[Test]
public void CSharpCheckedStatementAndExpressionTest()
{
CheckedStatement checkedStatement = ParseUtilCSharp.ParseStatement<CheckedStatement>("checked { checked(++i); }");
Assert.IsFalse(checkedStatement.Block.IsNull);
ExpressionStatement es = (ExpressionStatement)checkedStatement.Block.Children[0];
CheckedExpression ce = (CheckedExpression)es.Expression;
Assert.IsInstanceOf<UnaryOperatorExpression>(ce.Expression);
}
#endregion
#region VB.NET
// No VB.NET representation
#endregion
}
}