Changeset 103
- Timestamp:
- 08/04/07 13:34:12 (5 years ago)
- Files:
-
- trunk/Janett.build (modified) (2 diffs)
- trunk/Lib/ICSharpCode.NRefactory.dll (modified) (previous)
- trunk/Source/Framework/AstUtil.cs (modified) (2 diffs)
- trunk/Source/Framework/ExpressionTypeResolver.cs (modified) (6 diffs)
- trunk/Source/Framework/Mapping/MemberMapper.cs (modified) (4 diffs)
- trunk/Source/Framework/ParentVisitor.cs (modified) (2 diffs)
- trunk/Source/Framework/Refactoring/AccessorRefactoring.cs (modified) (2 diffs)
- trunk/Source/Framework/Refactoring/ImplementPropertyRegionTransformer.cs (modified) (2 diffs)
- trunk/Source/Framework/Refactoring/RemoveEmptyBlocksTransformer.cs (modified) (2 diffs)
- trunk/Source/Framework/ReferenceTransformer.cs (modified) (2 diffs)
- trunk/Source/Framework/SameFieldAndMethodNameTransformer.cs (modified) (2 diffs)
- trunk/Source/Framework/ShortenReferencesTransformer.cs (modified) (2 diffs)
- trunk/Source/Framework/StubTransformer.cs (modified) (2 diffs)
- trunk/Source/Framework/Transformer.cs (modified) (8 diffs)
- trunk/Source/Framework/TypeResolver.cs (modified) (1 diff)
- trunk/Source/Translator/Transformation/AbstractClassTransformer.cs (modified) (1 diff)
- trunk/Source/Translator/Transformation/AnonymousClassTransformer.cs (modified) (7 diffs)
- trunk/Source/Translator/Transformation/ArrayInitializerTransformer.cs (modified) (7 diffs)
- trunk/Source/Translator/Transformation/DotClassTransformer.cs (modified) (2 diffs)
- trunk/Source/Translator/Transformation/IKVMDifferencesTransformer.cs (modified) (3 diffs)
- trunk/Source/Translator/Transformation/InnerClassTransformer.cs (modified) (3 diffs)
- trunk/Source/Translator/Transformation/InterfaceTransformer.cs (modified) (2 diffs)
- trunk/Source/Translator/Transformation/InternalMethodInvocationTransformer.cs (modified) (4 diffs)
- trunk/Source/Translator/Transformation/JavaModifiersTransformer.cs (modified) (3 diffs)
- trunk/Source/Translator/Transformation/NullableValueTypeTransformer.cs (modified) (6 diffs)
- trunk/Source/Translator/Transformation/ProjectInterfaceTransformer.cs (modified) (5 diffs)
- trunk/Source/Translator/Transformation/SerializableTransformer.cs (modified) (2 diffs)
- trunk/Source/Translator/Transformation/StaticConstructorTransformer.cs (modified) (4 diffs)
- trunk/Source/Translator/Transformation/StaticPrimitiveTypeFieldsTransformer.cs (modified) (1 diff)
- trunk/Source/Translator/Transformation/TestCaseTransformer.cs (modified) (4 diffs)
- trunk/Source/UnitTests/Framework/AstUtilTest.cs (modified) (2 diffs)
- trunk/Source/UnitTests/Framework/ExpressionTypeResolverTest.cs (modified) (1 diff)
- trunk/Source/UnitTests/Framework/MethodRelatedTransformerTest.cs (modified) (4 diffs)
- trunk/Source/UnitTests/Framework/ShortenReferencesTransformerTest.cs (modified) (2 diffs)
- trunk/Source/UnitTests/Framework/TypeResolverTest.cs (modified) (1 diff)
- trunk/Source/UnitTests/Framework/UsingVisitorTest.cs (modified) (2 diffs)
- trunk/Source/UnitTests/TestCode/AbstractClassTransformerTest/Polymorphism.cs (modified) (1 diff)
- trunk/Source/UnitTests/TestCode/IKVMDifferencesTransformerTest/ComparatorDerivedClass.cs (modified) (1 diff)
- trunk/Source/UnitTests/TestCode/InternalMethodInvocationTest/InternalConstructor.java (modified) (1 diff)
- trunk/Source/UnitTests/TestCode/InternalMethodInvocationTest/InvocationInTestCase.java (modified) (1 diff)
- trunk/Source/UnitTests/TestCode/InternalMethodInvocationTest/StaticInvocationInTestCase.java (modified) (1 diff)
- trunk/Source/UnitTests/TestCode/MemberMapperTest/AddingCast.cs (modified) (1 diff)
- trunk/Source/UnitTests/TestCode/ShortenReferencesTransformerTest/OptimizeUsings.java (modified) (1 diff)
- trunk/Source/UnitTests/Translator/IntegrationTest/IKVMExpected/Class1.cs (modified) (2 diffs)
- trunk/Source/UnitTests/Translator/InternalMethodInvocationTest.cs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Janett.build
r102 r103 90 90 </target> 91 91 92 <target name="run-tests"> 93 <setenv name="COMPLUS_Version" value="v${framework::get-clr-version(Framework)}"/> 94 <exec program="${nunit.path}nunit-console.exe" commandline="${TestAssembly}"/> 95 <setenv name="COMPLUS_Version" value=""/> 96 </target> 97 92 98 <target name="test"> 93 <setenv name="COMPLUS_Version" value="v${framework::get-clr-version(Framework)}"/> 94 <exec program="${nunit.path}nunit-console.exe" workingdir="Source/UnitTests/bin/Debug" commandline="UnitTest.dll"/> 95 <setenv name="COMPLUS_Version" value=""/> 99 <property name="TestAssembly" value="Source/UnitTests/bin/Debug/UnitTest.dll"/> 100 <call target="test"/> 96 101 </target> 97 102 … … 108 113 <exec program="Bin/janett.exe" commandline="Classifier/Java ../IKVM /m IKVM"/> 109 114 <solution solutionfile="Classifier/IKVM/NClassifier.sln" configuration="debug"/> 110 <exec program="${nunit.path}nunit-console.exe" workingdir="Classifier/IKVM/UnitTests/bin/Debug" commandline="UnitTests.dll"/> 115 <property name="TestAssembly" value="Classifier/IKVM/UnitTests/bin/Debug/UnitTests.dll"/> 116 <call target="run-tests"/> 111 117 112 118 <delete dir="Classifier/DotNet" if="${directory::exists('Classifier/DotNet')}"/> 113 119 <exec program="Bin/janett.exe" commandline="Classifier/Java ../DotNet /m DotNet"/> 114 120 <solution solutionfile="Classifier/DotNet/NClassifier.sln" configuration="debug"/> 115 <exec program="${nunit.path}nunit-console.exe" workingdir="Classifier/DotNet/UnitTests/bin/Debug" commandline="UnitTests.dll"/> 121 <property name="TestAssembly" value="Classifier/DotNet/UnitTests/bin/Debug/UnitTests.dll"/> 122 <call target="run-tests"/> 116 123 </target> 117 124 trunk/Source/Framework/AstUtil.cs
r11 r103 2 2 { 3 3 using System; 4 using System.Collections ;4 using System.Collections.Generic; 5 5 6 6 using ICSharpCode.NRefactory.Ast; … … 27 27 } 28 28 29 public ArrayListGetChildrenWithType(INode parentNode, Type specificType)29 public List<INode> GetChildrenWithType(INode parentNode, Type specificType) 30 30 { 31 ArrayList list = new ArrayList();31 List<INode> list = new List<INode>(); 32 32 foreach (INode node in parentNode.Children) 33 33 { trunk/Source/Framework/ExpressionTypeResolver.cs
r66 r103 3 3 using System; 4 4 using System.Collections; 5 using System.Collections.Generic; 5 6 6 7 using ICSharpCode.NRefactory.Ast; … … 16 17 { 17 18 primitiveTypeMappings = new Hashtable(); 18 foreach ( DictionaryEntryentry in TypeReference.PrimitiveTypesCSharp)19 foreach (KeyValuePair<string, string> entry in TypeReference.PrimitiveTypesCSharp) 19 20 primitiveTypeMappings.Add(entry.Value, entry.Key); 20 21 } … … 128 129 return ((ParameterDeclarationExpression) ex).TypeReference; 129 130 } 130 else if (ex is NullExpression)131 else if (ex == Expression.Null) 131 132 { 132 133 return null; … … 186 187 { 187 188 BlockStatement body = GetBody(parentScope); 188 ArrayListparameters = ((ParametrizedNode) parentScope).Parameters;189 List<ParameterDeclarationExpression> parameters = ((ParametrizedNode) parentScope).Parameters; 189 190 TypeDeclaration typeDeclaration = AstUtil.GetParentOfType(parentScope, typeof(TypeDeclaration)) as TypeDeclaration; 190 191 typeReference = GetTypeInLocalVariables(body, identifier); … … 230 231 } 231 232 232 protected TypeReference GetTypeInArguments( ArrayListparameters, string identifier)233 protected TypeReference GetTypeInArguments(List<ParameterDeclarationExpression> parameters, string identifier) 233 234 { 234 235 foreach (ParameterDeclarationExpression parameter in parameters) … … 302 303 if (expression.Value == null) 303 304 { 304 NullTypeReference nullType = NullTypeReference.Instance;305 TypeReference nullType = TypeReference.Null; 305 306 nullType.Parent = expression.Parent; 306 307 return nullType; trunk/Source/Framework/Mapping/MemberMapper.cs
r76 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 using System.IO; 5 6 … … 196 197 { 197 198 replacedExpression = GetReplacedExpression(invocationExpression, methodKey, mapping.Members); 198 if (replacedExpression[0] is NullExpression)199 if (replacedExpression[0] == Expression.Null) 199 200 { 200 201 RemoveCurrentNode(); … … 308 309 309 310 Substitution substitution = new Substitution(); 310 ArrayListparameters = GetParameters(expression);311 List<Expression> parameters = GetParameters(expression); 311 312 Expression targetId = GetTargetObject(expression); 312 313 substitution.Identifier = targetId; … … 361 362 } 362 363 363 private ArrayListGetParameters(Expression expression)364 private List<Expression> GetParameters(Expression expression) 364 365 { 365 366 if (expression is InvocationExpression) trunk/Source/Framework/ParentVisitor.cs
r21 r103 370 370 } 371 371 372 public override object Visit ArrayInitializerExpression(ArrayInitializerExpression arrayInitializerExpression, object data)372 public override object VisitCollectionInitializerExpression(CollectionInitializerExpression arrayInitializerExpression, object data) 373 373 { 374 374 foreach (INode node in arrayInitializerExpression.CreateExpressions) … … 376 376 node.Parent = arrayInitializerExpression; 377 377 } 378 return base.Visit ArrayInitializerExpression(arrayInitializerExpression, data);378 return base.VisitCollectionInitializerExpression(arrayInitializerExpression, data); 379 379 } 380 380 trunk/Source/Framework/Refactoring/AccessorRefactoring.cs
r83 r103 94 94 string fieldName = accessorMethod.Name.Substring(3); 95 95 TypeDeclaration typeDeclaration = (TypeDeclaration) accessorMethod.Parent; 96 if (IsInterface(typeDeclaration) || (IsAbstractClass(typeDeclaration) && !HasField(fields, fieldName) && accessorMethod.Body is NullBlockStatement))97 block = NullBlockStatement.Instance;96 if (IsInterface(typeDeclaration) || (IsAbstractClass(typeDeclaration) && !HasField(fields, fieldName) && accessorMethod.Body == BlockStatement.Null)) 97 block = BlockStatement.Null; 98 98 else 99 99 { … … 260 260 BlockStatement block; 261 261 if (IsInterface(typeDeclaration) || (IsAbstractClass(typeDeclaration) && !HasField(fields, propertyName))) 262 block = NullBlockStatement.Instance;262 block = BlockStatement.Null; 263 263 else 264 264 { trunk/Source/Framework/Refactoring/ImplementPropertyRegionTransformer.cs
r83 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 14 15 { 15 16 method.TypeReference = new TypeReference("void"); 16 ArrayList parameters = new ArrayList();17 List<ParameterDeclarationExpression> parameters = new List<ParameterDeclarationExpression>(); 17 18 parameters.Add(new ParameterDeclarationExpression(typeReference, "Parameter1")); 18 19 method.Parameters = parameters; trunk/Source/Framework/Refactoring/RemoveEmptyBlocksTransformer.cs
r80 r103 1 1 namespace Janett.Framework 2 2 { 3 using System.Collections ;3 using System.Collections.Generic; 4 4 5 5 using ICSharpCode.NRefactory.Ast; … … 19 19 if (ifElseStatement.HasElseIfSections) 20 20 { 21 ArrayList elseIfSections = new ArrayList();21 List<ElseIfSection> elseIfSections = new List<ElseIfSection>(); 22 22 elseIfSections.AddRange(ifElseStatement.ElseIfSections); 23 23 foreach (ElseIfSection stm in ifElseStatement.ElseIfSections) trunk/Source/Framework/ReferenceTransformer.cs
r87 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 360 361 IList fields = new ArrayList(); 361 362 362 ArrayListfieldDeclarations = AstUtil.GetChildrenWithType(typeDeclaration, typeof(FieldDeclaration));363 List<INode> fieldDeclarations = AstUtil.GetChildrenWithType(typeDeclaration, typeof(FieldDeclaration)); 363 364 foreach (FieldDeclaration fieldDeclaration in fieldDeclarations) 364 365 fields.Add(((VariableDeclaration) fieldDeclaration.Fields[0]).Name); trunk/Source/Framework/SameFieldAndMethodNameTransformer.cs
r84 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 9 10 public override object TrackedVisitTypeDeclaration(TypeDeclaration typeDeclaration, object data) 10 11 { 11 ArrayListfields = AstUtil.GetChildrenWithType(typeDeclaration, typeof(FieldDeclaration));12 List<INode> fields = AstUtil.GetChildrenWithType(typeDeclaration, typeof(FieldDeclaration)); 12 13 if (fields.Count > 0) 13 14 { trunk/Source/Framework/ShortenReferencesTransformer.cs
r11 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 17 18 { 18 19 NamespaceDeclaration replaceNamespace = namespaceDeclaration; 19 ArrayListchildren = namespaceDeclaration.Children;20 List<INode> children = namespaceDeclaration.Children; 20 21 INode[] childMembers = new INode[children.Count]; 21 22 children.CopyTo(childMembers); trunk/Source/Framework/StubTransformer.cs
r91 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 55 56 blockStatement.Children.Clear(); 56 57 TypeReference notImplmentedException = new TypeReference("System.NotImplementedException"); 57 ObjectCreateExpression objectCreate = new ObjectCreateExpression(notImplmentedException, new ArrayList());58 ObjectCreateExpression objectCreate = new ObjectCreateExpression(notImplmentedException, new List<Expression>()); 58 59 blockStatement.Children.Add(new ThrowStatement(objectCreate)); 59 60 return null; trunk/Source/Framework/Transformer.cs
r76 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory; … … 227 228 protected bool AreSameTypes(TypeReference parameterType, TypeReference argumentType) 228 229 { 229 if (argumentType is NullTypeReference)230 if (argumentType == TypeReference.Null) 230 231 return true; 231 232 string parameterFullType = GetFullName(parameterType); … … 313 314 } 314 315 315 protected string GetArgumentsMap (ArrayListarguments, ArgumentMapType argumentMapType)316 protected string GetArgumentsMap<T>(List<T> arguments, ArgumentMapType argumentMapType) 316 317 { 317 318 string argumentsMap = ""; … … 328 329 { 329 330 argumentType = GetFullName(argumentTypeReference); 330 if (TypeReference.PrimitiveTypesJavaReverse.Contains (argumentType))331 if (TypeReference.PrimitiveTypesJavaReverse.ContainsKey(argumentType)) 331 332 argumentType = (string) TypeReference.PrimitiveTypesJavaReverse[argumentType]; 332 333 if (argumentType == "java.lang.String") … … 419 420 } 420 421 421 protected IListGetAccessibleMethods(TypeDeclaration typeDeclaration)422 { 423 ArrayListmethods = AstUtil.GetChildrenWithType(typeDeclaration, typeof(MethodDeclaration));422 protected List<INode> GetAccessibleMethods(TypeDeclaration typeDeclaration) 423 { 424 List<INode> methods = AstUtil.GetChildrenWithType(typeDeclaration, typeof(MethodDeclaration)); 424 425 if (typeDeclaration.BaseTypes.Count > 0) 425 426 { … … 540 541 private void InsertSidesOfCurrentNode(IList nodes, BlockStatement blockStatement, int index, Position position) 541 542 { 542 ArrayList coll = new ArrayList();543 List<INode> coll = new List<INode>(); 543 544 foreach (INode node in nodes) 544 545 { … … 554 555 } 555 556 556 private int GetIndex( ArrayListlist, INode node)557 private int GetIndex(List<INode> list, INode node) 557 558 { 558 559 int index = 0; … … 576 577 } 577 578 578 protected bool MatchArguments( ArrayList parameters, ArrayListarguments)579 protected bool MatchArguments(List<ParameterDeclarationExpression> parameters, List<Expression> arguments) 579 580 { 580 581 if (parameters.Count == arguments.Count) trunk/Source/Framework/TypeResolver.cs
r89 r103 87 87 } 88 88 89 if (TypeReference.PrimitiveTypesJava.Contains (typeReference.Type))89 if (TypeReference.PrimitiveTypesJava.ContainsKey(typeReference.Type)) 90 90 return (string) TypeReference.PrimitiveTypesJava[typeReference.Type]; 91 91 trunk/Source/Translator/Transformation/AbstractClassTransformer.cs
r32 r103 89 89 foreach (MethodDeclaration method in comparedList) 90 90 { 91 if (!Contains(baseList, method) && method.Body is NullBlockStatement)91 if (!Contains(baseList, method) && method.Body == BlockStatement.Null) 92 92 diffList.Add(method); 93 93 } trunk/Source/Translator/Transformation/AnonymousClassTransformer.cs
r102 r103 3 3 using System.Collections; 4 4 using System.Collections.Specialized; 5 using System.Collections.Generic; 5 6 6 7 using ICSharpCode.NRefactory.Ast; … … 66 67 IDictionary anonymousFields = unknownFields; 67 68 68 ArrayList constructorParameters = new ArrayList();69 List<ParameterDeclarationExpression> constructorParameters = new List<ParameterDeclarationExpression>(); 69 70 70 71 ParameterDeclarationExpression parentInstance = new ParameterDeclarationExpression( … … 216 217 { 217 218 IList list = AstUtil.GetChildrenWithType(eqType, typeof(FieldDeclaration)); 218 ArrayListconstructors = AstUtil.GetChildrenWithType(eqType, typeof(ConstructorDeclaration));219 List<INode> constructors = AstUtil.GetChildrenWithType(eqType, typeof(ConstructorDeclaration)); 219 220 if (constructors.Count > 0) 220 221 { … … 226 227 } 227 228 228 private void AddAnonymousClassConstructor(ObjectCreateExpression obc, TypeDeclaration typeDeclaration, ArrayListparameters)229 { 230 ArrayList constructorParameters = new ArrayList();231 ArrayListbaseArguments = GetBaseConstructorParameters(obc);229 private void AddAnonymousClassConstructor(ObjectCreateExpression obc, TypeDeclaration typeDeclaration, List<ParameterDeclarationExpression> parameters) 230 { 231 List<ParameterDeclarationExpression> constructorParameters = new List<ParameterDeclarationExpression>(); 232 List<ParameterDeclarationExpression> baseArguments = GetBaseConstructorParameters(obc); 232 233 constructorParameters.AddRange(baseArguments); 233 234 constructorParameters.AddRange(parameters); … … 287 288 } 288 289 289 private ArrayListGetBaseConstructorParameters(ObjectCreateExpression obc)290 { 291 ArrayList result = new ArrayList();290 private List<ParameterDeclarationExpression> GetBaseConstructorParameters(ObjectCreateExpression obc) 291 { 292 List<ParameterDeclarationExpression> result = new List<ParameterDeclarationExpression>(); 292 293 TypeDeclaration anonymousClass = obc.AnonymousClass; 293 294 if (obc.Parameters.Count > 0) … … 335 336 } 336 337 337 private void InitializeConstructor(ConstructorDeclaration constructor, ArrayListinitializerArguments, string initializerType)338 private void InitializeConstructor(ConstructorDeclaration constructor, List<ParameterDeclarationExpression> initializerArguments, string initializerType) 338 339 { 339 340 if (initializerType != null) … … 346 347 constructor.ConstructorInitializer.ConstructorInitializerType = ConstructorInitializerType.This; 347 348 348 constructor.ConstructorInitializer.Arguments = new ArrayList();349 constructor.ConstructorInitializer.Arguments = new List<Expression>(); 349 350 if (initializerArguments != null) 350 351 { trunk/Source/Translator/Transformation/ArrayInitializerTransformer.cs
r76 r103 1 1 namespace Janett.Translator 2 2 { 3 using System.Collections ;3 using System.Collections.Generic; 4 4 5 5 using ICSharpCode.NRefactory.Ast; … … 12 12 { 13 13 string variableName = GetVariableName(arrayCreateExpression); 14 ArrayListinitializerList = arrayCreateExpression.ArrayInitializer.CreateExpressions;14 List<Expression> initializerList = arrayCreateExpression.ArrayInitializer.CreateExpressions; 15 15 Expression replacedExpression = arrayCreateExpression; 16 if (initializerList.Count > 0 && initializerList[0] is ArrayInitializerExpression && data is InsertionBlockData)16 if (initializerList.Count > 0 && initializerList[0] is CollectionInitializerExpression && data is InsertionBlockData) 17 17 { 18 18 ArrayCreateExpression replacedArrayCreateExpression = arrayCreateExpression; … … 28 28 } 29 29 30 IListinitStatements = GetArrayInitStatements(replacedArrayCreateExpression, variableName, initializerList);30 List<Statement> initStatements = GetArrayInitStatements(replacedArrayCreateExpression, variableName, initializerList); 31 31 InsertionBlockData insertionBlockData = (InsertionBlockData) data; 32 32 insertionBlockData.Block = (BlockStatement) AstUtil.GetParentOfType(replacedArrayCreateExpression, typeof(BlockStatement)); … … 61 61 if (blockStatement.GetHashCode() == insertionBlockData.Block.GetHashCode()) 62 62 { 63 replaced.Children.InsertRange(insertionBlockData.BlockChildIndex, insertionBlockData.Statements); 63 IList<INode> nodes = new List<INode>(); 64 foreach (Statement node in insertionBlockData.Statements) 65 nodes.Add(node); 66 replaced.Children.InsertRange(insertionBlockData.BlockChildIndex, nodes); 64 67 ReplaceCurrentNode(replaced); 65 68 } … … 68 71 } 69 72 70 private IList GetArrayInitStatements(ArrayCreateExpression arrayCreateExpression, string variableName, ArrayListinitializerList)73 private List<Statement> GetArrayInitStatements(ArrayCreateExpression arrayCreateExpression, string variableName, List<Expression> initializerList) 71 74 { 72 IList list = new ArrayList();75 List<Statement> list = new List<Statement>(); 73 76 for (int idx = 0; idx < initializerList.Count; idx++) 74 77 { 75 AssignmentExpression assignment = InitArrayStatement(arrayCreateExpression, variableName, (( ArrayInitializerExpression) initializerList[idx]).CreateExpressions, idx);78 AssignmentExpression assignment = InitArrayStatement(arrayCreateExpression, variableName, ((CollectionInitializerExpression) initializerList[idx]).CreateExpressions, idx); 76 79 ExpressionStatement expressionStatement = new ExpressionStatement(assignment); 77 80 list.Add(expressionStatement); … … 96 99 } 97 100 98 private AssignmentExpression InitArrayStatement(ArrayCreateExpression arrayCreateExpression, string variableName, ArrayListcreatExpressions, int index)101 private AssignmentExpression InitArrayStatement(ArrayCreateExpression arrayCreateExpression, string variableName, List<Expression> creatExpressions, int index) 99 102 { 100 103 IdentifierExpression identifierExpression = new IdentifierExpression(variableName); 101 ArrayList indexes = new ArrayList();104 List<Expression> indexes = new List<Expression>(); 102 105 indexes.Add(new PrimitiveExpression(index, index.ToString())); 103 106 IndexerExpression left = new IndexerExpression(identifierExpression, indexes); 104 107 string createType = arrayCreateExpression.CreateType.Type; 105 108 ArrayCreateExpression right = new ArrayCreateExpression(new TypeReference(createType, new int[1])); 106 right.ArrayInitializer = new ArrayInitializerExpression(creatExpressions);109 right.ArrayInitializer = new CollectionInitializerExpression(creatExpressions); 107 110 return new AssignmentExpression(left, AssignmentOperatorType.Assign, right); 108 111 } … … 142 145 143 146 public int BlockChildIndex; 144 public IListStatements;147 public List<Statement> Statements; 145 148 } 146 149 } trunk/Source/Translator/Transformation/DotClassTransformer.cs
r6 r103 1 1 namespace Janett.Translator 2 2 { 3 using System.Collections ;3 using System.Collections.Generic; 4 4 5 5 using ICSharpCode.NRefactory.Ast; … … 25 25 FieldReferenceExpression argument = new FieldReferenceExpression(typeOfExpression, "AssemblyQualifiedName"); 26 26 typeOfExpression.Parent = argument; 27 ArrayList arguments = new ArrayList();27 List<Expression> arguments = new List<Expression>(); 28 28 arguments.Add(argument); 29 29 IdentifierExpression methodIdentifier = new IdentifierExpression("java.lang.Class"); trunk/Source/Translator/Transformation/IKVMDifferencesTransformer.cs
r2 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 17 18 18 19 MethodDeclaration equalsMethod = new MethodDeclaration("equals", 19 Modifiers.Public, AstUtil.GetTypeReference("bool", typeDeclaration), new ArrayList(), null);20 Modifiers.Public, AstUtil.GetTypeReference("bool", typeDeclaration), new List<ParameterDeclarationExpression>(), null); 20 21 equalsMethod.Parent = typeDeclaration; 21 22 … … 67 68 IdentifierExpression targetObject = new IdentifierExpression("java.lang.Object"); 68 69 69 ArrayList arguments = new ArrayList();70 List<Expression> arguments = new List<Expression>(); 70 71 arguments.Add(new ThisReferenceExpression()); 71 72 string parameterName = ((ParameterDeclarationExpression) equalsMethod.Parameters[0]).ParameterName; trunk/Source/Translator/Transformation/InnerClassTransformer.cs
r52 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 42 43 if (typeDeclaration.Parent is TypeDeclaration) 43 44 { 44 ArrayList argList = new ArrayList();45 List<ParameterDeclarationExpression> argList = new List<ParameterDeclarationExpression>(); 45 46 int i = 0; 46 47 foreach (Expression argument in invocationExpression.Arguments) … … 154 155 { 155 156 string name = typeDeclaration.Name; 156 ArrayList parameters = new ArrayList();157 List<ParameterDeclarationExpression> parameters = new List<ParameterDeclarationExpression>(); 157 158 parameters.Add(fieldParameter); 158 159 ConstructorDeclaration constructorDeclaration = new ConstructorDeclaration(name, Modifiers.Public, parameters, null); trunk/Source/Translator/Transformation/InterfaceTransformer.cs
r45 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 20 21 private void CreateInterfaceFieldsClass(TypeDeclaration typeDeclaration) 21 22 { 22 IListfields = AstUtil.GetChildrenWithType(typeDeclaration, typeof(FieldDeclaration));23 List<INode> fields = AstUtil.GetChildrenWithType(typeDeclaration, typeof(FieldDeclaration)); 23 24 if (fields.Count > 0) 24 25 { trunk/Source/Translator/Transformation/InternalMethodInvocationTransformer.cs
r43 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 65 66 TypeReferenceExpression helper = new TypeReferenceExpression("Helpers.ReflectionHelper"); 66 67 FieldReferenceExpression target = new FieldReferenceExpression(helper, "InstantiateClass"); 67 ArrayList arguments = new ArrayList();68 List<Expression> arguments = new List<Expression>(); 68 69 TypeOfExpression typeofExpression = new TypeOfExpression(objectCreateExpression.CreateType); 69 ArrayInitializerExpression arrayInitializer = new ArrayInitializerExpression(objectCreateExpression.Parameters);70 CollectionInitializerExpression arrayInitializer = new CollectionInitializerExpression(objectCreateExpression.Parameters); 70 71 TypeReference reference = new TypeReference("object"); 71 72 reference.RankSpecifier = new int[1]; … … 92 93 private InvocationExpression CreateReflectionInvocation(InvocationExpression invocationExpression, bool staticMethod) 93 94 { 94 ArrayList arguments = new ArrayList();95 List<Expression> arguments = new List<Expression>(); 95 96 FieldReferenceExpression fieldReferenceExpression = (FieldReferenceExpression) invocationExpression.TargetObject; 96 97 Expression invoker = fieldReferenceExpression.TargetObject; … … 107 108 arguments.Add(invoker); 108 109 109 ArrayInitializerExpression arrayInitializer = new ArrayInitializerExpression(invocationExpression.Arguments);110 CollectionInitializerExpression arrayInitializer = new CollectionInitializerExpression(invocationExpression.Arguments); 110 111 TypeReference reference = AstUtil.GetTypeReference("object", invocationExpression); 111 112 reference.RankSpecifier = new int[1]; trunk/Source/Translator/Transformation/JavaModifiersTransformer.cs
r11 r103 1 1 namespace Janett.Translator 2 2 { 3 using System.Collections ;3 using System.Collections.Generic; 4 4 5 5 using ICSharpCode.NRefactory.Ast; … … 23 23 if (AstUtil.ContainsModifier(methodDeclaration, Modifiers.Synchronized)) 24 24 { 25 ArrayList positionalArgs = new ArrayList();25 List<Expression> positionalArgs = new List<Expression>(); 26 26 TypeReferenceExpression system = new TypeReferenceExpression("System.Runtime.CompilerServices.MethodImplOptions"); 27 27 FieldReferenceExpression attributeArgument = new FieldReferenceExpression(system, "Synchronized"); … … 49 49 } 50 50 51 private AttributeSection CreateAttributeSection(string attributeName, ArrayListargs)51 private AttributeSection CreateAttributeSection(string attributeName, List<Expression> args) 52 52 { 53 53 Attribute attribute = new Attribute(attributeName, args, null); 54 ArrayList attributes = new ArrayList();54 List<Attribute> attributes = new List<Attribute>(); 55 55 attributes.Add(attribute); 56 56 AttributeSection attributeSection = new AttributeSection("", attributes); trunk/Source/Translator/Transformation/NullableValueTypeTransformer.cs
r82 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 175 176 { 176 177 TypeDeclaration typeDeclaration = (TypeDeclaration) CodeBase.Types[fullName]; 177 ArrayListargs = ReplaceNullArguments(typeDeclaration, objectCreateExpression.Parameters, objectCreateExpression);178 List<Expression> args = ReplaceNullArguments(typeDeclaration, objectCreateExpression.Parameters, objectCreateExpression); 178 179 objectCreateExpression.Parameters = args; 179 180 } … … 186 187 { 187 188 TypeDeclaration typeDeclaration = (TypeDeclaration) AstUtil.GetParentOfType(constructorInitializer, typeof(TypeDeclaration)); 188 ArrayListargs = ReplaceNullArguments(typeDeclaration, constructorInitializer.Arguments, constructorInitializer);189 List<Expression> args = ReplaceNullArguments(typeDeclaration, constructorInitializer.Arguments, constructorInitializer); 189 190 constructorInitializer.Arguments = args; 190 191 } … … 197 198 { 198 199 TypeDeclaration typeDeclaration = (TypeDeclaration) AstUtil.GetParentOfType(invocationExpression, typeof(TypeDeclaration)); 199 ArrayListargs = ReplaceNullArguments(typeDeclaration, invocationExpression.Arguments, invocationExpression);200 List<Expression> args = ReplaceNullArguments(typeDeclaration, invocationExpression.Arguments, invocationExpression); 200 201 invocationExpression.Arguments = args; 201 202 } … … 203 204 } 204 205 205 private ArrayList ReplaceNullArguments(TypeDeclaration typeDeclaration, ArrayListArgExpressions, INode node)206 private List<Expression> ReplaceNullArguments(TypeDeclaration typeDeclaration, List<Expression> ArgExpressions, INode node) 206 207 { 207 208 int index = 0; 208 ArrayList args = new ArrayList();209 List<Expression> args = new List<Expression>(); 209 210 210 211 foreach (Expression argument in ArgExpressions) … … 237 238 } 238 239 239 private ParametrizedNode GetAssociateMember(TypeDeclaration typeDeclaration, INode node, ArrayListargExpressions)240 private ParametrizedNode GetAssociateMember(TypeDeclaration typeDeclaration, INode node, List<Expression> argExpressions) 240 241 { 241 242 if (node is InvocationExpression) trunk/Source/Translator/Transformation/ProjectInterfaceTransformer.cs
r45 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 17 18 if (typeDeclaration.Type == ClassType.Interface) 18 19 { 19 ArrayListmethods = AstUtil.GetChildrenWithType(typeDeclaration, typeof(MethodDeclaration));20 ArrayListtypeDeclarations = AstUtil.GetChildrenWithType(typeDeclaration, typeof(TypeDeclaration));20 IEnumerable<INode> methods = AstUtil.GetChildrenWithType(typeDeclaration, typeof(MethodDeclaration)); 21 List<INode> typeDeclarations = AstUtil.GetChildrenWithType(typeDeclaration, typeof(TypeDeclaration)); 21 22 22 23 typeDeclaration.Children.Clear(); … … 29 30 } 30 31 31 private void RemoveMethodsModifier(I Listmethods)32 private void RemoveMethodsModifier(IEnumerable<INode> methods) 32 33 { 33 34 foreach (MethodDeclaration method in methods) … … 35 36 } 36 37 37 private void SeperateTypes(TypeDeclaration typeDeclaration, ArrayListtypeDeclarations)38 private void SeperateTypes(TypeDeclaration typeDeclaration, List<INode> typeDeclarations) 38 39 { 39 40 NamespaceDeclaration namespaceDeclaration = (NamespaceDeclaration) AstUtil.GetParentOfType(typeDeclaration, typeof(NamespaceDeclaration)); … … 42 43 CodeBase.References.Add(typeDeclaration.Name + "." + type.Name, namespaceDeclaration.Name + "." + type.Name); 43 44 namespaceDeclaration.Children.Add(type); 44 I ListtypeMethods = AstUtil.GetChildrenWithType(type, typeof(MethodDeclaration));45 IEnumerable<INode> typeMethods = AstUtil.GetChildrenWithType(type, typeof(MethodDeclaration)); 45 46 if (type.Type == ClassType.Interface) 46 47 RemoveMethodsModifier(typeMethods); trunk/Source/Translator/Transformation/SerializableTransformer.cs
r19 r103 1 1 namespace Janett.Translator 2 2 { 3 using System.Collections ;3 using System.Collections.Generic; 4 4 5 5 using ICSharpCode.NRefactory.Ast; … … 19 19 if (typeDeclaration.Type == ClassType.Class) 20 20 { 21 ArrayList attributes = new ArrayList();21 List<Attribute> attributes = new List<Attribute>(); 22 22 Attribute attribute = new Attribute("System.SerializableAttribute", null, null); 23 23 attributes.Add(attribute); trunk/Source/Translator/Transformation/StaticConstructorTransformer.cs
r2 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 12 13 { 13 14 TypeDeclaration replacedType = typeDeclaration; 14 ArrayList typeChildren = new ArrayList();15 List<INode> typeChildren = new List<INode>(); 15 16 typeChildren.AddRange(typeDeclaration.Children); 16 17 … … 40 41 for (int i = 1; i < staticConstructors.Count; i++) 41 42 { 42 ArrayListchildren = ((ConstructorDeclaration) staticConstructors[i]).Body.Children;43 IEnumerable<INode> children = ((ConstructorDeclaration) staticConstructors[i]).Body.Children; 43 44 replacedConstructor.Body.Children.AddRange(children); 44 45 } … … 58 59 } 59 60 60 private ArrayList RemoveStaticConstructors(ArrayListtypeChildren, out int firstStaticCotrIndex)61 private List<INode> RemoveStaticConstructors(List<INode> typeChildren, out int firstStaticCotrIndex) 61 62 { 62 ArrayList cleanList = new ArrayList();63 List<INode> cleanList = new List<INode>(); 63 64 firstStaticCotrIndex = 0; 64 65 int index = 0; trunk/Source/Translator/Transformation/StaticPrimitiveTypeFieldsTransformer.cs
r85 r103 24 24 private bool IsJavaPrimitiveType(TypeReference typeReference) 25 25 { 26 return (TypeReference.PrimitiveTypesJava.Contains (typeReference.Type));26 return (TypeReference.PrimitiveTypesJava.ContainsKey(typeReference.Type)); 27 27 } 28 28 } trunk/Source/Translator/Transformation/TestCaseTransformer.cs
r69 r103 1 1 namespace Janett.Translator 2 2 { 3 using System.Collections ;3 using System.Collections.Generic; 4 4 5 5 using ICSharpCode.NRefactory.Ast; … … 17 17 TypeDeclaration newType = typeDeclaration; 18 18 Attribute attr = new Attribute("NUnit.Framework.TestFixture", null, null); 19 ArrayList attributes = new ArrayList();19 List<Attribute> attributes = new List<Attribute>(); 20 20 attributes.Add(attr); 21 21 AttributeSection attrSection = new AttributeSection(null, attributes); … … 42 42 MethodDeclaration replaced = methodDeclaration; 43 43 Attribute attr = new Attribute("NUnit.Framework.Test", null, null); 44 ArrayList attributes = new ArrayList();44 List<Attribute> attributes = new List<Attribute>(); 45 45 attributes.Add(attr); 46 46 AttributeSection testAttribute = new AttributeSection(null, attributes); … … 62 62 63 63 Attribute attribute = new Attribute(attributeName, null, null); 64 ArrayList attributes = new ArrayList();64 List<Attribute> attributes = new List<Attribute>(); 65 65 attributes.Add(attribute); 66 66 AttributeSection attributeSection = new AttributeSection(null, attributes); trunk/Source/UnitTests/Framework/AstUtilTest.cs
r2 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 29 30 TypeDeclaration typeDeclaration = (TypeDeclaration) ns.Children[0]; 30 31 31 ArrayListfieldList = AstUtil.GetChildrenWithType(typeDeclaration, typeof(FieldDeclaration));32 ArrayListmethodList = AstUtil.GetChildrenWithType(typeDeclaration, typeof(MethodDeclaration));32 List<INode> fieldList = AstUtil.GetChildrenWithType(typeDeclaration, typeof(FieldDeclaration)); 33 List<INode> methodList = AstUtil.GetChildrenWithType(typeDeclaration, typeof(MethodDeclaration)); 33 34 34 35 Assert.IsNotNull(fieldList); trunk/Source/UnitTests/Framework/ExpressionTypeResolverTest.cs
r66 r103 558 558 TypeReference type = GetType(nl); 559 559 Assert.IsNotNull(type); 560 Assert. IsTrue(type is NullTypeReference);560 Assert.AreEqual(TypeReference.Null, type); 561 561 } 562 562 } trunk/Source/UnitTests/Framework/MethodRelatedTransformerTest.cs
r16 r103 2 2 { 3 3 using System.Collections; 4 using System.Collections.Generic; 4 5 5 6 using ICSharpCode.NRefactory.Ast; … … 23 24 ParameterDeclarationExpression p2 = new ParameterDeclarationExpression(new TypeReference("string"), "text"); 24 25 p2.TypeReference.RankSpecifier = new int[] {}; 25 ArrayList argList = new ArrayList();26 List<ParameterDeclarationExpression> argList = new List<ParameterDeclarationExpression>(); 26 27 argList.Add(p1); 27 28 argList.Add(p2); … … 75 76 new TypeReference("int"), "from"); 76 77 pm.TypeReference.RankSpecifier = new int[] {}; 77 ArrayList al = new ArrayList();78 List<ParameterDeclarationExpression> al = new List<ParameterDeclarationExpression>(); 78 79 al.Add(pm); 79 80 MethodDeclaration myMethod = new MethodDeclaration("Distance", Modifiers.Protected, … … 95 96 ParameterDeclarationExpression p1 = new ParameterDeclarationExpression(new TypeReference("Circle"), "circle"); 96 97 p1.TypeReference.RankSpecifier = new int[] {}; 97 ArrayList md1Param = new ArrayList();98 List<ParameterDeclarationExpression> md1Param = new List<ParameterDeclarationExpression>(); 98 99 md1Param.Add(p1); 99 100 MethodDeclaration md1 = new MethodDeclaration("GetRadius", Modifiers.Private, new TypeReference("int"), md1Param, null); trunk/Source/UnitTests/Framework/ShortenReferencesTransformerTest.cs
r2 r103 1 1 namespace Janett.Framework 2 2 { 3 using ICSharpCode.NRefactory; 3 4 using ICSharpCode.NRefactory.Ast; 4 5 … … 20 21 string expected = TestUtil.GetExpected(); 21 22 22 CompilationUnit cu = TestUtil.ParseProgram(program );23 CompilationUnit cu = TestUtil.ParseProgram(program, SupportedLanguage.CSharp); 23 24 VisitCompilationUnit(cu, null); 24 25 trunk/Source/UnitTests/Framework/TypeResolverTest.cs
r89 r103 142 142 public void InnerTypeImportedViaPackage() 143 143 { 144 string program = TestUtil.PackageMemberParse("import importjava.util.*; public class A { Map.Entry entry;}");144 string program = TestUtil.PackageMemberParse("import java.util.*; public class A { Map.Entry entry;}"); 145 145 CompilationUnit cu = TestUtil.ParseProgram(program); 146 146 NamespaceDeclaration ns = (NamespaceDeclaration) cu.Children[0]; trunk/Source/UnitTests/Framework/UsingVisitorTest.cs
r11 r103 1 1 namespace Janett.Framework 2 2 { 3 using ICSharpCode.NRefactory; 3 4 using ICSharpCode.NRefactory.Ast; 4 5 … … 27 28 public void Attribute() 28 29 { 29 string program = " package Test; [NUnit.Framework.TestFixtureAttribute] public class A {}";30 CompilationUnit cu = TestUtil.ParseProgram(program );30 string program = "namespace Test{ [NUnit.Framework.TestFixtureAttribute] public class A {} }"; 31 CompilationUnit cu = TestUtil.ParseProgram(program, SupportedLanguage.CSharp); 31 32 VisitCompilationUnit(cu, null); 32 33 trunk/Source/UnitTests/TestCode/AbstractClassTransformerTest/Polymorphism.cs
r32 r103 3 3 public interface Comparator 4 4 { 5 int equals(Object arg);5 int @equals(Object arg); 6 6 } 7 7 public class Object 8 8 { 9 public int equals(Object obj)9 public int @equals(Object obj) 10 10 { 11 11 return 0; trunk/Source/UnitTests/TestCode/IKVMDifferencesTransformerTest/ComparatorDerivedClass.cs
r2 r103 7 7 return 0; 8 8 } 9 public bool equals(java.lang.Object obj)9 public bool @equals(java.lang.Object obj) 10 10 { 11 11 return java.lang.Object.instancehelper_equals(this, obj); trunk/Source/UnitTests/TestCode/InternalMethodInvocationTest/InternalConstructor.java
r43 r103 1 package Test; 2 [NUnit.Framework.TestFixture()] 3 public class TestA 1 namespace Test 4 2 { 5 public void testMethod() 3 [NUnit.Framework.TestFixture()] 4 public class TestA 6 5 { 7 Test test = new Test("TestClass", 0); 6 public void testMethod() 7 { 8 Test test = new Test("TestClass", 0); 9 } 8 10 } 9 11 } trunk/Source/UnitTests/TestCode/InternalMethodInvocationTest/InvocationInTestCase.java
r2 r103 1 package Test; 2 [NUnit.Framework.TestFixture()] 3 public class TestA 1 namespace Test 4 2 { 5 public void testMethod() 3 [NUnit.Framework.TestFixture()] 4 public class TestA 6 5 { 7 A a = null; 8 a.method(0, 1); 9 int r = a.method(1, 0); 6 public void testMethod() 7 { 8 A a = null; 9 a.method(0, 1); 10 int r = a.method(1, 0); 11 } 10 12 } 11 13 } trunk/Source/UnitTests/TestCode/InternalMethodInvocationTest/StaticInvocationInTestCase.java
r30 r103 1 package Test; 2 [NUnit.Framework.TestFixture()] 3 public class TestA 1 namespace Test 4 2 { 5 public void testMethod() 3 [NUnit.Framework.TestFixture()] 4 public class TestA 6 5 { 7 A a = null; 8 a.method(0, 1); 9 int r = a.method(1, 0); 6 public void testMethod() 7 { 8 A a = null; 9 a.method(0, 1); 10 int r = a.method(1, 0); 11 } 10 12 } 11 13 } trunk/Source/UnitTests/TestCode/MemberMapperTest/AddingCast.cs
r30 r103 7 7 public void Method() 8 8 { 9 List myList; Set set; ((System.Collections.ArrayList)set).AddRange(myList);9 List myList; Set @set; ((System.Collections.ArrayList)@set).AddRange(myList); 10 10 } 11 11 } trunk/Source/UnitTests/TestCode/ShortenReferencesTransformerTest/OptimizeUsings.java
r11 r103 1 package Test; 2 public class A implements System.IComparable 1 namespace Test 3 2 { 4 [System.NonSerializedAttribute()] 5 System.IComparable com; 3 public class A : System.IComparable 4 { 5 [System.NonSerializedAttribute()] 6 System.IComparable com; 7 } 6 8 } trunk/Source/UnitTests/Translator/IntegrationTest/IKVMExpected/Class1.cs
r96 r103 46 46 Name = name; 47 47 java.util.Calendar cal = java.util.Calendar.getInstance(); 48 int min = cal. get(java.util.Calendar.MINUTE);49 cal. set(java.util.Calendar.MONTH, java.util.Calendar.AUGUST);50 cal. add(java.util.Calendar.HOUR, 12);48 int min = cal.@get(java.util.Calendar.MINUTE); 49 cal.@set(java.util.Calendar.MONTH, java.util.Calendar.AUGUST); 50 cal.@add(java.util.Calendar.HOUR, 12); 51 51 return base.ExistSimilarFieldAndMethod(); 52 52 } … … 139 139 } 140 140 } 141 public override bool equals(object obj)141 public override bool @equals(object obj) 142 142 { 143 143 return java.lang.Object.instancehelper_equals(this, obj); trunk/Source/UnitTests/Translator/InternalMethodInvocationTest.cs
r43 r103 1 1 namespace Janett.Translator 2 2 { 3 using ICSharpCode.NRefactory; 3 4 using ICSharpCode.NRefactory.Ast; 4 5 … … 29 30 string expected = TestUtil.GetExpected(); 30 31 31 CompilationUnit cu2 = TestUtil.ParseProgram(program2 );32 CompilationUnit cu2 = TestUtil.ParseProgram(program2, SupportedLanguage.CSharp); 32 33 NamespaceDeclaration ns2 = (NamespaceDeclaration) cu2.Children[0]; 33 34 TypeDeclaration ty2 = (TypeDeclaration) ns2.Children[0]; … … 52 53 string expected = TestUtil.GetExpected(); 53 54 54 CompilationUnit cu2 = TestUtil.ParseProgram(program2 );55 CompilationUnit cu2 = TestUtil.ParseProgram(program2, SupportedLanguage.CSharp); 55 56 NamespaceDeclaration ns2 = (NamespaceDeclaration) cu2.Children[0]; 56 57 TypeDeclaration ty2 = (TypeDeclaration) ns2.Children[0]; … … 74 75 NamespaceDeclaration ns = (NamespaceDeclaration) cu1.Children[0]; 75 76 TypeDeclaration ty = (TypeDeclaration) ns.Children[0]; 76 CompilationUnit cu2 = TestUtil.ParseProgram(usageProgram );77 CompilationUnit cu2 = TestUtil.ParseProgram(usageProgram, SupportedLanguage.CSharp); 77 78 78 79 CodeBase.Types.Add("Test.Test", ty);
