~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/Libraries/NRefactory/Test/Parser/Statements/ForStatementTests.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.IO;
 
6
using NUnit.Framework;
 
7
using ICSharpCode.NRefactory.Parser;
 
8
using ICSharpCode.NRefactory.Ast;
 
9
 
 
10
namespace ICSharpCode.NRefactory.Tests.Ast
 
11
{
 
12
        [TestFixture]
 
13
        public class ForStatementTests
 
14
        {
 
15
                #region C#
 
16
                [Test]
 
17
                public void CSharpEmptyForStatementTest()
 
18
                {
 
19
                        ForStatement forStmt = ParseUtilCSharp.ParseStatement<ForStatement>("for (;;) ;");
 
20
                        Assert.AreEqual(0, forStmt.Initializers.Count);
 
21
                        Assert.AreEqual(0, forStmt.Iterator.Count);
 
22
                        Assert.IsTrue(forStmt.Condition.IsNull);
 
23
                        Assert.IsTrue(forStmt.EmbeddedStatement is EmptyStatement);
 
24
                }
 
25
                
 
26
                [Test]
 
27
                public void CSharpForStatementTest()
 
28
                {
 
29
                        ForStatement forStmt = ParseUtilCSharp.ParseStatement<ForStatement>("for (int i = 5; i < 6; ++i) {} ");
 
30
                        // TODO : Extend test.
 
31
                }
 
32
                #endregion
 
33
                
 
34
                #region VB.NET
 
35
                        // No VB.NET representation (for ... next is different)
 
36
                #endregion
 
37
                
 
38
        }
 
39
}