Browse Source

Updated to NUnit 2.2.8. Commented out SharpDevelop tests that no longer compile. Removed all occurrences of %3B from project files. Added a probing binary path to SharpDevelop's app.config pointing to the location of the NUnit assemblies. This allows the Unit Testing window to work without needing NUnit added to the GAC.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1833 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 19 years ago
parent
commit
1eddd435a2
  1. 2
      src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/Boo.InterpreterAddIn.booproj
  2. 2
      src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj
  3. 858
      src/AddIns/BackendBindings/Boo/BooBinding/Test/ResolverTests.cs
  4. 2
      src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Project/NRefactoryToBooConverter.csproj
  5. 3
      src/AddIns/BackendBindings/CSharpBinding/Test/ExpressionFinder.cs
  6. 5
      src/AddIns/BackendBindings/WixBinding/Test/WixBinding.Tests.csproj
  7. 2
      src/AddIns/DisplayBindings/IconEditor/IconEditor/IconEditor.csproj
  8. 2
      src/AddIns/DisplayBindings/IconEditor/IconEditorAddIn/IconEditorAddIn.csproj
  9. 2
      src/AddIns/Misc/AddInManager/Project/AddInManager.csproj
  10. 2
      src/AddIns/Misc/CodeAnalysis/CodeAnalysis.csproj
  11. 2
      src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.csproj
  12. 8
      src/AddIns/Misc/CodeCoverage/Test/CodeCoverage.Tests.csproj
  13. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.csproj
  14. 2
      src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Debugger.BooInterpreter.csproj
  15. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj
  16. 1146
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTests.cs
  17. 2
      src/AddIns/Misc/Debugger/TreeListView/Project/TreeListView.csproj
  18. 2
      src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj
  19. 2
      src/AddIns/Misc/MonoAddIn/Project/MonoAddIn.csproj
  20. 3
      src/AddIns/Misc/SharpQuery/SharpQuery.csproj
  21. 2
      src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj
  22. 10
      src/AddIns/Misc/UnitTesting/UnitTesting.csproj
  23. 6
      src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj
  24. 2
      src/Libraries/ICSharpCode.Build.Tasks/Project/ICSharpCode.Build.Tasks.csproj
  25. 2
      src/Libraries/ICSharpCode.TextEditor/Project/ICSharpCode.TextEditor.csproj
  26. 4
      src/Libraries/NRefactory/Project/NRefactory.csproj
  27. 474
      src/Main/Base/Test/GenericResolverTests.cs
  28. 8
      src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj
  29. 208
      src/Main/Base/Test/InnerClassesResolverTests.cs
  30. 88
      src/Main/Base/Test/MemberLookupHelperTests.cs
  31. 1846
      src/Main/Base/Test/NRefactoryResolverTests.cs
  32. 124
      src/Main/Base/Test/OverloadFinding.cs
  33. 274
      src/Main/Base/Test/ReflectionLayerTests.cs
  34. 246
      src/Main/Base/Test/SearchClassTests.cs
  35. 158
      src/Main/Base/Test/SearchGenericClassTests.cs
  36. 2
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/ICSharpCode.SharpDevelop.Dom.csproj
  37. 4
      src/Main/ICSharpCode.SharpDevelop.Sda/ICSharpCode.SharpDevelop.Sda.csproj
  38. 1
      src/Main/StartUp/Project/app.template.config

2
src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/Boo.InterpreterAddIn.booproj

@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
</PropertyGroup>

2
src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

858
src/AddIns/BackendBindings/Boo/BooBinding/Test/ResolverTests.cs

@ -19,434 +19,434 @@ namespace Grunwald.BooBinding.Tests @@ -19,434 +19,434 @@ namespace Grunwald.BooBinding.Tests
[TestFixture]
public class ResolverTests
{
#region Helper
T Resolve<T>(string code) where T : ResolveResult
{
return Resolve<T>(code, "/*1*/");
}
T Resolve<T>(string code, string marker) where T : ResolveResult
{
return Resolve<T>(normalProg, code, marker);
}
T Resolve<T>(string prog, string code, string marker) where T : ResolveResult
{
ResolveResult rr = Resolve(prog, new ExpressionResult(code), marker);
Assert.IsNotNull(rr, "Resolve must not return null");
Assert.IsInstanceOfType(typeof(T), rr, "Resolve must return instance of type " + typeof(T).Name);
return (T)rr;
}
IProjectContent booLangPC;
public ResolverTests() {
booLangPC = new ReflectionProjectContent(Assembly.Load("Boo.Lang"), "Boo.Lang.dll");
booLangPC.ReferencedContents.Add(ProjectContentRegistry.Mscorlib);
}
const string fileName = "tempFile.boo";
DefaultProjectContent lastPC;
void Register(string prog)
{
DefaultProjectContent pc = new DefaultProjectContent();
lastPC = pc;
HostCallback.GetCurrentProjectContent = delegate { return pc; };
pc.ReferencedContents.Add(ProjectContentRegistry.Mscorlib);
pc.ReferencedContents.Add(ProjectContentRegistry.GetProjectContentForReference("System.Windows.Forms", "System.Windows.Forms"));
pc.ReferencedContents.Add(booLangPC);
ICompilationUnit cu = new BooParser().Parse(pc, fileName, prog);
ParserService.UpdateParseInformation(cu, fileName, false, false);
cu.Classes.ForEach(pc.AddClassToNamespaceList);
}
void GetPos(string prog, string marker, out int line, out int column)
{
int index = prog.IndexOf(marker);
line = 1;
column = 0;
for (int i = 0; i < index; i++) {
column++;
if (prog[i]=='\n') {
line++;
column = 0;
}
}
}
ResolveResult Resolve(string prog, ExpressionResult er, string marker)
{
Register(prog);
int line, column;
GetPos(prog, marker, out line, out column);
BooResolver r = new BooResolver();
return r.Resolve(er, line, column, fileName, prog);
}
#endregion
#region Basic tests
const string normalProg =
"import System\n" +
"def MyMethod(arg as string):\n" +
"\tlocalVar = arg\n" +
"\t/*1*/\n" +
"\tclosure = { e as string | arg.IndexOf(e) /*inClosure*/ }\n" +
"\tindex = closure('.')\n" +
"\t/*2*/\n" +
"\tclosure2 = def(e as DateTime):\n" +
"\t\treturn e.Year\n" +
"\trecursiveClosure = def(myObject):/*inRecursiveClosure*/\n" +
"\t\treturn recursiveClosure(myObject)\n" +
"\t/*3*/\n";
[Test]
public void MethodParameter()
{
LocalResolveResult rr = Resolve<LocalResolveResult>("arg");
Assert.IsTrue(rr.IsParameter);
Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
}
[Test]
public void LocalVariable()
{
LocalResolveResult rr = Resolve<LocalResolveResult>("localVar");
Assert.IsFalse(rr.IsParameter);
Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
}
[Test]
public void NullCoalescing()
{
ResolveResult rr = Resolve<ResolveResult>("localVar or arg");
Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
}
[Test]
public void InnerClassEnum()
{
TypeResolveResult trr = Resolve<TypeResolveResult>("Environment.SpecialFolder");
Assert.AreEqual("System.Environment.SpecialFolder", trr.ResolvedClass.FullyQualifiedName);
MemberResolveResult mrr = Resolve<MemberResolveResult>("Environment.SpecialFolder.Desktop");
Assert.AreEqual("System.Environment.SpecialFolder.Desktop", mrr.ResolvedMember.FullyQualifiedName);
}
[Test]
public void ClosureParameter()
{
LocalResolveResult rr = Resolve<LocalResolveResult>("e", "/*inClosure*/");
Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
Assert.IsNull(Resolve(normalProg, new ExpressionResult("e"), "/*1*/"));
}
[Test]
public void ClosureCall()
{
LocalResolveResult rr = Resolve<LocalResolveResult>("closure('.')", "/*2*/");
Assert.IsFalse(rr.IsParameter);
Assert.AreEqual("closure", rr.Field.Name);
Assert.AreEqual("System.Int32", rr.ResolvedType.FullyQualifiedName);
}
[Test]
public void ClosureCall2()
{
LocalResolveResult rr = Resolve<LocalResolveResult>("closure2(DateTime.Now)", "/*3*/");
Assert.IsFalse(rr.IsParameter);
Assert.AreEqual("closure2", rr.Field.Name);
Assert.AreEqual("System.Int32", rr.ResolvedType.FullyQualifiedName);
}
[Test]
public void RecursiveClosure()
{
// Code-completion cannot work here, test if SharpDevelop is correctly
// preventing the StackOverflow.
LocalResolveResult rr = Resolve<LocalResolveResult>("recursiveClosure", "/*3*/");
Assert.IsFalse(rr.IsParameter);
Assert.AreEqual("delegate(myObject:Object):?", rr.ResolvedType.FullyQualifiedName);
}
[Test]
public void ClosureTypelessArgument()
{
LocalResolveResult rr = Resolve<LocalResolveResult>("myObject", "/*inRecursiveClosure*/");
Assert.AreEqual("System.Object", rr.ResolvedType.FullyQualifiedName);
}
[Test]
public void EqualityOperator()
{
ResolveResult rr = Resolve<ResolveResult>("0 == 0");
Assert.AreEqual("System.Boolean", rr.ResolvedType.FullyQualifiedName);
rr = Resolve<ResolveResult>("0 != 1");
Assert.AreEqual("System.Boolean", rr.ResolvedType.FullyQualifiedName);
rr = Resolve<ResolveResult>("null is null");
Assert.AreEqual("System.Boolean", rr.ResolvedType.FullyQualifiedName);
rr = Resolve<ResolveResult>("object() is not null");
Assert.AreEqual("System.Boolean", rr.ResolvedType.FullyQualifiedName);
}
[Test]
public void ClassMethodAmbiguity()
{
string prog =
"class Test:\n" +
"\tdef constructor():\n" +
"\t\tpass\n" +
"class OtherClass:\n" +
"\tdef Test():\n" +
"\t\t/*mark*/\n" +
"\t\tpass\n";
MemberResolveResult rr = Resolve<MemberResolveResult>(prog, "Test()", "/*mark*/");
Assert.AreEqual("OtherClass.Test", rr.ResolvedMember.FullyQualifiedName);
}
#endregion
#region Regression
const string regressionProg =
"import System\n" +
"import System.Reflection\n" +
"def MyMethod(arg as string):\n" +
"\tif true:\n" +
"\t\tboo629 = 'hello'\n" +
"\tfor boo640a in [1, 2, 3]:\n" +
"\t\tif boo640b = boo640a as FieldInfo: /*640*/\n" +
"\t\t\tprint boo640b\n" +
"\t\n" +
"\tprint 'end of method'\n" +
"\t/*1*/\n";
[Test]
public void MyMethodCompletion()
{
MethodResolveResult rr = Resolve<MethodResolveResult>(regressionProg, "MyMethod", "/*1*/");
ArrayList arr = rr.GetCompletionData(lastPC);
Assert.IsNotNull(arr);
bool beginInvoke = false;
bool invoke = false;
foreach (IMember m in arr) {
if (m.Name == "BeginInvoke") beginInvoke = true;
if (m.Name == "Invoke") invoke = true;
}
Assert.IsTrue(beginInvoke, "beginInvoke");
Assert.IsTrue(invoke, "invoke");
}
[Test]
public void Boo629VariableScope()
{
LocalResolveResult rr = Resolve<LocalResolveResult>(regressionProg, "boo629", "/*1*/");
Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
}
[Test]
public void Boo640ConditionalAssignment()
{
LocalResolveResult rr = Resolve<LocalResolveResult>(regressionProg, "boo640b", "/*1*/");
Assert.AreEqual("System.Reflection.FieldInfo", rr.ResolvedType.FullyQualifiedName);
rr = Resolve<LocalResolveResult>(regressionProg, "boo640a", "/*640*/");
Assert.AreEqual("System.Object", rr.ResolvedType.FullyQualifiedName);
Assert.IsNull(Resolve(regressionProg, new ExpressionResult("boo640a"), "/*1*/"));
}
[Test]
public void IndexerRecognition()
{
string prog =
"class Foo:\n" +
"\tself[index as int]:\n" +
"\t\tget:\n" +
"\t\t\treturn true\n" +
"def example():\n" +
"\tfoo = Foo()\n" +
"\tmybool = foo[1] /*mark*/\n" +
"\tprint mybool\n";
MemberResolveResult rr = Resolve<MemberResolveResult>(prog, "foo[1]", "/*mark*/");
Assert.IsTrue(((IProperty)rr.ResolvedMember).IsIndexer);
Assert.AreEqual("System.Boolean", rr.ResolvedType.FullyQualifiedName);
LocalResolveResult rr2 = Resolve<LocalResolveResult>(prog, "mybool", "/*mark*/");
Assert.AreEqual("System.Boolean", rr2.ResolvedType.FullyQualifiedName);
}
[Test]
public void InfiniteRecursionGenerator()
{
string prog =
"class Test:\n" +
"\t_testList = []\n" +
"\tTestProperty:\n" +
"\t\tget:\n" +
"\t\t\tfor testobj as Test in _testList:\n" +
"\t\t\t\tyield testobj.TestProperty /*mark*/\n";
MemberResolveResult rr = Resolve<MemberResolveResult>(prog, "testobj.TestProperty", "/*mark*/");
Assert.AreEqual("Test.TestProperty", rr.ResolvedMember.FullyQualifiedName);
Assert.AreEqual("System.Collections.Generic.IEnumerable", rr.ResolvedType.FullyQualifiedName);
// prevent creating self-referring ConstructedReturnType
Assert.AreEqual("?", rr.ResolvedType.CastToConstructedReturnType().TypeArguments[0].FullyQualifiedName);
}
#endregion
#region Nested Classes
const string nestedClassProg =
"class Outer:\n" +
"\tpublic static outerField = 1\n" +
"\tpublic class Inner:\n/*inner*/" +
"\t\tpublic innerField = 2\n" +
"class Derived(Outer):\n/*derived*/" +
"\tpublic static derivedField = 3\n" +
"def Method():\n" +
"\ti as Outer.Inner\n" +
"\ti2 as Derived.Inner\n" +
"\t/*1*/";
[Test]
public void NestedClassTypeResolution()
{
TypeResolveResult trr;
trr = Resolve<TypeResolveResult>(nestedClassProg, "Outer.Inner", "/*1*/");
Assert.AreEqual("Outer.Inner", trr.ResolvedClass.FullyQualifiedName);
trr = Resolve<TypeResolveResult>(nestedClassProg, "Inner", "/*inner*/");
Assert.AreEqual("Outer.Inner", trr.ResolvedClass.FullyQualifiedName);
trr = Resolve<TypeResolveResult>(nestedClassProg, "Inner", "/*derived*/");
Assert.AreEqual("Outer.Inner", trr.ResolvedClass.FullyQualifiedName);
trr = Resolve<TypeResolveResult>(nestedClassProg, "Derived.Inner", "/*1*/");
Assert.AreEqual("Outer.Inner", trr.ResolvedClass.FullyQualifiedName);
}
[Test]
public void NestedClassCtrlSpace()
{
CtrlSpace(nestedClassProg.Replace("/*inner*/", "/*mark*/"), "outerField", "innerField", "Inner", "Outer", "Derived");
CtrlSpace(nestedClassProg.Replace("/*derived*/", "/*mark*/"), "outerField", "derivedField", "Inner", "Outer", "Derived");
}
[Test]
public void NestedClassParentStaticField()
{
MemberResolveResult mrr = Resolve<MemberResolveResult>(nestedClassProg, "outerField", "/*inner*/");
Assert.AreEqual("Outer.outerField", mrr.ResolvedMember.FullyQualifiedName);
}
[Test]
public void NestedClassCC()
{
LocalResolveResult rr = Resolve<LocalResolveResult>(nestedClassProg, "i", "/*1*/");
Assert.AreEqual("Outer.Inner", rr.ResolvedType.FullyQualifiedName);
bool ok = false;
foreach (object o in rr.GetCompletionData(lastPC)) {
IMember m = o as IMember;
if (m != null && m.Name == "innerField")
ok = true;
}
Assert.IsTrue(ok);
MemberResolveResult mrr = Resolve<MemberResolveResult>(nestedClassProg, "i.innerField", "/*1*/");
Assert.AreEqual("Outer.Inner.innerField", mrr.ResolvedMember.FullyQualifiedName);
}
[Test]
public void NestedClassCC2()
{
LocalResolveResult rr = Resolve<LocalResolveResult>(nestedClassProg, "i2", "/*1*/");
Assert.AreEqual("Outer.Inner", rr.ResolvedType.FullyQualifiedName);
bool ok = false;
foreach (object o in rr.GetCompletionData(lastPC)) {
IMember m = o as IMember;
if (m != null && m.Name == "innerField")
ok = true;
}
Assert.IsTrue(ok);
MemberResolveResult mrr = Resolve<MemberResolveResult>(nestedClassProg, "i2.innerField", "/*1*/");
Assert.AreEqual("Outer.Inner.innerField", mrr.ResolvedMember.FullyQualifiedName);
}
#endregion
#region CtrlSpace
void CtrlSpace(string prog, params string[] expected)
{
CtrlSpace(new string[0], prog, expected);
}
void CtrlSpace(string[] unExpected, string prog, params string[] expected)
{
Register(prog);
int line, column;
GetPos(prog, "/*mark*/", out line, out column);
BooResolver r = new BooResolver();
System.Collections.ArrayList ar;
ar = r.CtrlSpace(line, column, fileName, prog, ExpressionContext.Default);
foreach (string e in unExpected) {
foreach (object o in ar) {
if (e.Equals(o))
Assert.Fail("Didn't expect " + e);
if (o is IMember && (o as IMember).Name == e) {
Assert.Fail("Didn't expect " + e);
}
if (o is IClass && (o as IClass).Name == e) {
Assert.Fail("Didn't expect " + e);
}
}
}
foreach (string e in expected) {
bool ok = false;
foreach (object o in ar) {
if (e.Equals(o)) {
if (ok) Assert.Fail("double entry " + e);
ok = true;
}
if (o is IMember && (o as IMember).Name == e) {
if (ok) Assert.Fail("double entry " + e);
ok = true;
}
if (o is IClass && (o as IClass).Name == e) {
if (ok) Assert.Fail("double entry " + e);
ok = true;
}
}
if (!ok)
Assert.Fail("Expected " + e);
}
}
[Test]
public void CtrlSpaceScopeExtension()
{
string prog =
"def Foo():\n" +
"\tbar = def():\n" +
"\t\tx = 0\n" +
"\t\t/*mark*/\n";
CtrlSpace(prog, "bar", "x");
}
[Test]
public void DoubleEntryTest()
{
string prog =
"class MyClass:\n" +
"\t_myInt = 0\n" +
"\tdef Foo():\n" +
"\t\t_myInt = 5\n" +
"\t\t/*mark*/\n";
CtrlSpace(prog, "_myInt");
}
[Test]
public void LoopInClosureTest()
{
string prog =
"def Foo():\n" +
"\tfor i in range(5):\n" +
"\t\tbar = def():\n" +
"\t\t\tx = 0\n" +
"\t\t\t/*mark*/\n" +
"\t\t\tprint x";
CtrlSpace(prog, "x", "bar", "i");
}
#endregion
// #region Helper
// T Resolve<T>(string code) where T : ResolveResult
// {
// return Resolve<T>(code, "/*1*/");
// }
//
// T Resolve<T>(string code, string marker) where T : ResolveResult
// {
// return Resolve<T>(normalProg, code, marker);
// }
//
// T Resolve<T>(string prog, string code, string marker) where T : ResolveResult
// {
// ResolveResult rr = Resolve(prog, new ExpressionResult(code), marker);
// Assert.IsNotNull(rr, "Resolve must not return null");
// Assert.IsInstanceOfType(typeof(T), rr, "Resolve must return instance of type " + typeof(T).Name);
// return (T)rr;
// }
//
// IProjectContent booLangPC;
//
// public ResolverTests() {
// booLangPC = new ReflectionProjectContent(Assembly.Load("Boo.Lang"), "Boo.Lang.dll");
// booLangPC.ReferencedContents.Add(ProjectContentRegistry.Mscorlib);
// }
//
// const string fileName = "tempFile.boo";
// DefaultProjectContent lastPC;
//
// void Register(string prog)
// {
// DefaultProjectContent pc = new DefaultProjectContent();
// lastPC = pc;
// HostCallback.GetCurrentProjectContent = delegate { return pc; };
// pc.ReferencedContents.Add(ProjectContentRegistry.Mscorlib);
// pc.ReferencedContents.Add(ProjectContentRegistry.GetProjectContentForReference("System.Windows.Forms", "System.Windows.Forms"));
// pc.ReferencedContents.Add(booLangPC);
// ICompilationUnit cu = new BooParser().Parse(pc, fileName, prog);
// ParserService.UpdateParseInformation(cu, fileName, false, false);
// cu.Classes.ForEach(pc.AddClassToNamespaceList);
// }
//
// void GetPos(string prog, string marker, out int line, out int column)
// {
// int index = prog.IndexOf(marker);
// line = 1;
// column = 0;
// for (int i = 0; i < index; i++) {
// column++;
// if (prog[i]=='\n') {
// line++;
// column = 0;
// }
// }
// }
//
// ResolveResult Resolve(string prog, ExpressionResult er, string marker)
// {
// Register(prog);
// int line, column;
// GetPos(prog, marker, out line, out column);
//
// BooResolver r = new BooResolver();
// return r.Resolve(er, line, column, fileName, prog);
// }
// #endregion
//
// #region Basic tests
// const string normalProg =
// "import System\n" +
// "def MyMethod(arg as string):\n" +
// "\tlocalVar = arg\n" +
// "\t/*1*/\n" +
// "\tclosure = { e as string | arg.IndexOf(e) /*inClosure*/ }\n" +
// "\tindex = closure('.')\n" +
// "\t/*2*/\n" +
// "\tclosure2 = def(e as DateTime):\n" +
// "\t\treturn e.Year\n" +
// "\trecursiveClosure = def(myObject):/*inRecursiveClosure*/\n" +
// "\t\treturn recursiveClosure(myObject)\n" +
// "\t/*3*/\n";
//
// [Test]
// public void MethodParameter()
// {
// LocalResolveResult rr = Resolve<LocalResolveResult>("arg");
// Assert.IsTrue(rr.IsParameter);
// Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void LocalVariable()
// {
// LocalResolveResult rr = Resolve<LocalResolveResult>("localVar");
// Assert.IsFalse(rr.IsParameter);
// Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void NullCoalescing()
// {
// ResolveResult rr = Resolve<ResolveResult>("localVar or arg");
// Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void InnerClassEnum()
// {
// TypeResolveResult trr = Resolve<TypeResolveResult>("Environment.SpecialFolder");
// Assert.AreEqual("System.Environment.SpecialFolder", trr.ResolvedClass.FullyQualifiedName);
//
// MemberResolveResult mrr = Resolve<MemberResolveResult>("Environment.SpecialFolder.Desktop");
// Assert.AreEqual("System.Environment.SpecialFolder.Desktop", mrr.ResolvedMember.FullyQualifiedName);
// }
//
// [Test]
// public void ClosureParameter()
// {
// LocalResolveResult rr = Resolve<LocalResolveResult>("e", "/*inClosure*/");
// Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
//
// Assert.IsNull(Resolve(normalProg, new ExpressionResult("e"), "/*1*/"));
// }
//
// [Test]
// public void ClosureCall()
// {
// LocalResolveResult rr = Resolve<LocalResolveResult>("closure('.')", "/*2*/");
// Assert.IsFalse(rr.IsParameter);
// Assert.AreEqual("closure", rr.Field.Name);
// Assert.AreEqual("System.Int32", rr.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void ClosureCall2()
// {
// LocalResolveResult rr = Resolve<LocalResolveResult>("closure2(DateTime.Now)", "/*3*/");
// Assert.IsFalse(rr.IsParameter);
// Assert.AreEqual("closure2", rr.Field.Name);
// Assert.AreEqual("System.Int32", rr.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void RecursiveClosure()
// {
// // Code-completion cannot work here, test if SharpDevelop is correctly
// // preventing the StackOverflow.
// LocalResolveResult rr = Resolve<LocalResolveResult>("recursiveClosure", "/*3*/");
// Assert.IsFalse(rr.IsParameter);
// Assert.AreEqual("delegate(myObject:Object):?", rr.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void ClosureTypelessArgument()
// {
// LocalResolveResult rr = Resolve<LocalResolveResult>("myObject", "/*inRecursiveClosure*/");
// Assert.AreEqual("System.Object", rr.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void EqualityOperator()
// {
// ResolveResult rr = Resolve<ResolveResult>("0 == 0");
// Assert.AreEqual("System.Boolean", rr.ResolvedType.FullyQualifiedName);
// rr = Resolve<ResolveResult>("0 != 1");
// Assert.AreEqual("System.Boolean", rr.ResolvedType.FullyQualifiedName);
// rr = Resolve<ResolveResult>("null is null");
// Assert.AreEqual("System.Boolean", rr.ResolvedType.FullyQualifiedName);
// rr = Resolve<ResolveResult>("object() is not null");
// Assert.AreEqual("System.Boolean", rr.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void ClassMethodAmbiguity()
// {
// string prog =
// "class Test:\n" +
// "\tdef constructor():\n" +
// "\t\tpass\n" +
// "class OtherClass:\n" +
// "\tdef Test():\n" +
// "\t\t/*mark*/\n" +
// "\t\tpass\n";
// MemberResolveResult rr = Resolve<MemberResolveResult>(prog, "Test()", "/*mark*/");
// Assert.AreEqual("OtherClass.Test", rr.ResolvedMember.FullyQualifiedName);
// }
// #endregion
//
// #region Regression
// const string regressionProg =
// "import System\n" +
// "import System.Reflection\n" +
// "def MyMethod(arg as string):\n" +
// "\tif true:\n" +
// "\t\tboo629 = 'hello'\n" +
// "\tfor boo640a in [1, 2, 3]:\n" +
// "\t\tif boo640b = boo640a as FieldInfo: /*640*/\n" +
// "\t\t\tprint boo640b\n" +
// "\t\n" +
// "\tprint 'end of method'\n" +
// "\t/*1*/\n";
//
// [Test]
// public void MyMethodCompletion()
// {
// MethodResolveResult rr = Resolve<MethodResolveResult>(regressionProg, "MyMethod", "/*1*/");
// ArrayList arr = rr.GetCompletionData(lastPC);
// Assert.IsNotNull(arr);
// bool beginInvoke = false;
// bool invoke = false;
// foreach (IMember m in arr) {
// if (m.Name == "BeginInvoke") beginInvoke = true;
// if (m.Name == "Invoke") invoke = true;
// }
// Assert.IsTrue(beginInvoke, "beginInvoke");
// Assert.IsTrue(invoke, "invoke");
// }
//
// [Test]
// public void Boo629VariableScope()
// {
// LocalResolveResult rr = Resolve<LocalResolveResult>(regressionProg, "boo629", "/*1*/");
// Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void Boo640ConditionalAssignment()
// {
// LocalResolveResult rr = Resolve<LocalResolveResult>(regressionProg, "boo640b", "/*1*/");
// Assert.AreEqual("System.Reflection.FieldInfo", rr.ResolvedType.FullyQualifiedName);
// rr = Resolve<LocalResolveResult>(regressionProg, "boo640a", "/*640*/");
// Assert.AreEqual("System.Object", rr.ResolvedType.FullyQualifiedName);
// Assert.IsNull(Resolve(regressionProg, new ExpressionResult("boo640a"), "/*1*/"));
// }
//
// [Test]
// public void IndexerRecognition()
// {
// string prog =
// "class Foo:\n" +
// "\tself[index as int]:\n" +
// "\t\tget:\n" +
// "\t\t\treturn true\n" +
// "def example():\n" +
// "\tfoo = Foo()\n" +
// "\tmybool = foo[1] /*mark*/\n" +
// "\tprint mybool\n";
// MemberResolveResult rr = Resolve<MemberResolveResult>(prog, "foo[1]", "/*mark*/");
// Assert.IsTrue(((IProperty)rr.ResolvedMember).IsIndexer);
// Assert.AreEqual("System.Boolean", rr.ResolvedType.FullyQualifiedName);
// LocalResolveResult rr2 = Resolve<LocalResolveResult>(prog, "mybool", "/*mark*/");
// Assert.AreEqual("System.Boolean", rr2.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void InfiniteRecursionGenerator()
// {
// string prog =
// "class Test:\n" +
// "\t_testList = []\n" +
// "\tTestProperty:\n" +
// "\t\tget:\n" +
// "\t\t\tfor testobj as Test in _testList:\n" +
// "\t\t\t\tyield testobj.TestProperty /*mark*/\n";
// MemberResolveResult rr = Resolve<MemberResolveResult>(prog, "testobj.TestProperty", "/*mark*/");
// Assert.AreEqual("Test.TestProperty", rr.ResolvedMember.FullyQualifiedName);
// Assert.AreEqual("System.Collections.Generic.IEnumerable", rr.ResolvedType.FullyQualifiedName);
// // prevent creating self-referring ConstructedReturnType
// Assert.AreEqual("?", rr.ResolvedType.CastToConstructedReturnType().TypeArguments[0].FullyQualifiedName);
// }
// #endregion
//
// #region Nested Classes
// const string nestedClassProg =
// "class Outer:\n" +
// "\tpublic static outerField = 1\n" +
// "\tpublic class Inner:\n/*inner*/" +
// "\t\tpublic innerField = 2\n" +
// "class Derived(Outer):\n/*derived*/" +
// "\tpublic static derivedField = 3\n" +
// "def Method():\n" +
// "\ti as Outer.Inner\n" +
// "\ti2 as Derived.Inner\n" +
// "\t/*1*/";
//
// [Test]
// public void NestedClassTypeResolution()
// {
// TypeResolveResult trr;
// trr = Resolve<TypeResolveResult>(nestedClassProg, "Outer.Inner", "/*1*/");
// Assert.AreEqual("Outer.Inner", trr.ResolvedClass.FullyQualifiedName);
// trr = Resolve<TypeResolveResult>(nestedClassProg, "Inner", "/*inner*/");
// Assert.AreEqual("Outer.Inner", trr.ResolvedClass.FullyQualifiedName);
// trr = Resolve<TypeResolveResult>(nestedClassProg, "Inner", "/*derived*/");
// Assert.AreEqual("Outer.Inner", trr.ResolvedClass.FullyQualifiedName);
// trr = Resolve<TypeResolveResult>(nestedClassProg, "Derived.Inner", "/*1*/");
// Assert.AreEqual("Outer.Inner", trr.ResolvedClass.FullyQualifiedName);
// }
//
// [Test]
// public void NestedClassCtrlSpace()
// {
// CtrlSpace(nestedClassProg.Replace("/*inner*/", "/*mark*/"), "outerField", "innerField", "Inner", "Outer", "Derived");
// CtrlSpace(nestedClassProg.Replace("/*derived*/", "/*mark*/"), "outerField", "derivedField", "Inner", "Outer", "Derived");
// }
//
// [Test]
// public void NestedClassParentStaticField()
// {
// MemberResolveResult mrr = Resolve<MemberResolveResult>(nestedClassProg, "outerField", "/*inner*/");
// Assert.AreEqual("Outer.outerField", mrr.ResolvedMember.FullyQualifiedName);
// }
//
// [Test]
// public void NestedClassCC()
// {
// LocalResolveResult rr = Resolve<LocalResolveResult>(nestedClassProg, "i", "/*1*/");
// Assert.AreEqual("Outer.Inner", rr.ResolvedType.FullyQualifiedName);
// bool ok = false;
// foreach (object o in rr.GetCompletionData(lastPC)) {
// IMember m = o as IMember;
// if (m != null && m.Name == "innerField")
// ok = true;
// }
// Assert.IsTrue(ok);
// MemberResolveResult mrr = Resolve<MemberResolveResult>(nestedClassProg, "i.innerField", "/*1*/");
// Assert.AreEqual("Outer.Inner.innerField", mrr.ResolvedMember.FullyQualifiedName);
// }
//
// [Test]
// public void NestedClassCC2()
// {
// LocalResolveResult rr = Resolve<LocalResolveResult>(nestedClassProg, "i2", "/*1*/");
// Assert.AreEqual("Outer.Inner", rr.ResolvedType.FullyQualifiedName);
// bool ok = false;
// foreach (object o in rr.GetCompletionData(lastPC)) {
// IMember m = o as IMember;
// if (m != null && m.Name == "innerField")
// ok = true;
// }
// Assert.IsTrue(ok);
// MemberResolveResult mrr = Resolve<MemberResolveResult>(nestedClassProg, "i2.innerField", "/*1*/");
// Assert.AreEqual("Outer.Inner.innerField", mrr.ResolvedMember.FullyQualifiedName);
// }
// #endregion
//
// #region CtrlSpace
// void CtrlSpace(string prog, params string[] expected)
// {
// CtrlSpace(new string[0], prog, expected);
// }
//
// void CtrlSpace(string[] unExpected, string prog, params string[] expected)
// {
// Register(prog);
// int line, column;
// GetPos(prog, "/*mark*/", out line, out column);
// BooResolver r = new BooResolver();
// System.Collections.ArrayList ar;
// ar = r.CtrlSpace(line, column, fileName, prog, ExpressionContext.Default);
// foreach (string e in unExpected) {
// foreach (object o in ar) {
// if (e.Equals(o))
// Assert.Fail("Didn't expect " + e);
// if (o is IMember && (o as IMember).Name == e) {
// Assert.Fail("Didn't expect " + e);
// }
// if (o is IClass && (o as IClass).Name == e) {
// Assert.Fail("Didn't expect " + e);
// }
// }
// }
// foreach (string e in expected) {
// bool ok = false;
// foreach (object o in ar) {
// if (e.Equals(o)) {
// if (ok) Assert.Fail("double entry " + e);
// ok = true;
// }
// if (o is IMember && (o as IMember).Name == e) {
// if (ok) Assert.Fail("double entry " + e);
// ok = true;
// }
// if (o is IClass && (o as IClass).Name == e) {
// if (ok) Assert.Fail("double entry " + e);
// ok = true;
// }
// }
// if (!ok)
// Assert.Fail("Expected " + e);
// }
// }
//
// [Test]
// public void CtrlSpaceScopeExtension()
// {
// string prog =
// "def Foo():\n" +
// "\tbar = def():\n" +
// "\t\tx = 0\n" +
// "\t\t/*mark*/\n";
// CtrlSpace(prog, "bar", "x");
// }
//
// [Test]
// public void DoubleEntryTest()
// {
// string prog =
// "class MyClass:\n" +
// "\t_myInt = 0\n" +
// "\tdef Foo():\n" +
// "\t\t_myInt = 5\n" +
// "\t\t/*mark*/\n";
// CtrlSpace(prog, "_myInt");
// }
//
// [Test]
// public void LoopInClosureTest()
// {
// string prog =
// "def Foo():\n" +
// "\tfor i in range(5):\n" +
// "\t\tbar = def():\n" +
// "\t\t\tx = 0\n" +
// "\t\t\t/*mark*/\n" +
// "\t\t\tprint x";
// CtrlSpace(prog, "x", "bar", "i");
// }
// #endregion
}
}

2
src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Project/NRefactoryToBooConverter.csproj

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<Optimize>false</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>

3
src/AddIns/BackendBindings/CSharpBinding/Test/ExpressionFinder.cs

@ -130,9 +130,10 @@ class Main { @@ -130,9 +130,10 @@ class Main {
}
[Test]
[Ignore("Temporarily ignored - code no longer compiles")]
public void NewException()
{
FindFull(program2, "otFoundException", "NotFoundException()", ExpressionContext.TypeDerivingFrom(ProjectContentRegistry.Mscorlib.GetClass("System.Exception"), true));
// FindFull(program2, "otFoundException", "NotFoundException()", ExpressionContext.TypeDerivingFrom(ProjectContentRegistry.Mscorlib.GetClass("System.Exception"), true));
}
}
}

5
src/AddIns/BackendBindings/WixBinding/Test/WixBinding.Tests.csproj

@ -35,10 +35,13 @@ @@ -35,10 +35,13 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="nunit.framework" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="nunit.framework">
<HintPath>..\..\..\..\Tools\NUnit\nunit.framework.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />

2
src/AddIns/DisplayBindings/IconEditor/IconEditor/IconEditor.csproj

@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

2
src/AddIns/DisplayBindings/IconEditor/IconEditorAddIn/IconEditorAddIn.csproj

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

2
src/AddIns/Misc/AddInManager/Project/AddInManager.csproj

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\AddInManager\</OutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

2
src/AddIns/Misc/CodeAnalysis/CodeAnalysis.csproj

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

2
src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.csproj

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\CodeCoverage\</OutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

8
src/AddIns/Misc/CodeCoverage/Test/CodeCoverage.Tests.csproj

@ -37,14 +37,14 @@ @@ -37,14 +37,14 @@
<Reference Include="System.Xml" />
<Reference Include="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="nunit.framework">
<HintPath>..\..\..\..\Tools\NUnit\nunit.framework.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="nunit.uikit">
<HintPath>..\..\..\..\Tools\NUnit\nunit.uikit.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\..\..\..\Tools\NUnit\nunit.framework.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.csproj

@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
<DebugType>Full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\..\..\..\AddIns\AddIns\Misc\Debugger\</OutputPath>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>

2
src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Debugger.BooInterpreter.csproj

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
</PropertyGroup>

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj

@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
<DebugType>Full</DebugType>
<NoWarn>108</NoWarn>
<OutputPath>..\..\..\..\..\..\AddIns\AddIns\Misc\Debugger\</OutputPath>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Optimize>False</Optimize>
</PropertyGroup>

1146
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTests.cs

File diff suppressed because it is too large Load Diff

2
src/AddIns/Misc/Debugger/TreeListView/Project/TreeListView.csproj

@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
<DebugType>Full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\..\..\..\AddIns\AddIns\Misc\Debugger\</OutputPath>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

2
src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj

@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\HtmlHelp2\</OutputPath>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>False</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

2
src/AddIns/Misc/MonoAddIn/Project/MonoAddIn.csproj

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\MonoAddIn\</OutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

3
src/AddIns/Misc/SharpQuery/SharpQuery.csproj

@ -64,8 +64,7 @@ @@ -64,8 +64,7 @@
<Compile Include="Src\Exceptions\SharpQueryAbstractException.cs" />
<Compile Include="Src\GUI\AbstractSharpQueryNode.cs" />
<Compile Include="Src\GUI\SharpQueryDataView.cs" />
<Compile Include="Src\GUI\SQLParameterInput.cs">
</Compile>
<Compile Include="Src\GUI\SQLParameterInput.cs" />
<Compile Include="Src\GUI\ISharpQueryNode.cs" />
<Compile Include="Src\GUI\SharpQueryPad.cs" />
<Compile Include="Src\Collections.cs" />

2
src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
<DebugSymbols>True</DebugSymbols>
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SubversionAddin\</OutputPath>
<Optimize>false</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>Full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

10
src/AddIns/Misc/UnitTesting/UnitTesting.csproj

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
@ -37,8 +37,8 @@ @@ -37,8 +37,8 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="nunit.uikit">
<HintPath>..\..\..\Tools\NUnit\nunit.uikit.dll</HintPath>
<Reference Include="nunit.util">
<HintPath>..\..\..\Tools\NUnit\nunit.util.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
@ -47,8 +47,8 @@ @@ -47,8 +47,8 @@
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="nunit.util">
<HintPath>..\..\..\Tools\NUnit\nunit.util.dll</HintPath>
<Reference Include="nunit.uikit">
<HintPath>..\..\..\Tools\NUnit\nunit.uikit.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>

6
src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj

@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
<OutputPath>bin\Debug\</OutputPath>
<BaseAddress>101187584</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<DefineConstants>TRACE%3bDEBUG%3bFRAMEWORK_VER_2x</DefineConstants>
<DefineConstants>TRACE;DEBUG;FRAMEWORK_VER_2x</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRules>-Microsoft.Design#CA1012%3b-Microsoft.Design#CA2210%3b-Microsoft.Design#CA1040%3b-Microsoft.Design#CA1005%3b-Microsoft.Design#CA1020%3b-Microsoft.Design#CA1021%3b-Microsoft.Design#CA1010%3b-Microsoft.Design#CA1011%3b-Microsoft.Design#CA1009%3b-Microsoft.Design#CA1050%3b-Microsoft.Design#CA1026%3b-Microsoft.Design#CA1019%3b-Microsoft.Design#CA1031%3b-Microsoft.Design#CA1047%3b-Microsoft.Design#CA1000%3b-Microsoft.Design#CA1048%3b-Microsoft.Design#CA1051%3b-Microsoft.Design#CA1002%3b-Microsoft.Design#CA1061%3b-Microsoft.Design#CA1006%3b-Microsoft.Design#CA1046%3b-Microsoft.Design#CA1045%3b-Microsoft.Design#CA1038%3b-Microsoft.Design#CA1008%3b-Microsoft.Design#CA1028%3b-Microsoft.Design#CA1004%3b-Microsoft.Design#CA1035%3b-Microsoft.Design#CA1063%3b-Microsoft.Design#CA1032%3b-Microsoft.Design#CA1023%3b-Microsoft.Design#CA1033%3b-Microsoft.Design#CA1039%3b-Microsoft.Design#CA1016%3b-Microsoft.Design#CA1014%3b-Microsoft.Design#CA1017%3b-Microsoft.Design#CA1018%3b-Microsoft.Design#CA1027%3b-Microsoft.Design#CA1059%3b-Microsoft.Design#CA1060%3b-Microsoft.Design#CA1034%3b-Microsoft.Design#CA1013%3b-Microsoft.Design#CA1036%3b-Microsoft.Design#CA1044%3b-Microsoft.Design#CA1041%3b-Microsoft.Design#CA1025%3b-Microsoft.Design#CA1052%3b-Microsoft.Design#CA1053%3b-Microsoft.Design#CA1057%3b-Microsoft.Design#CA1058%3b-Microsoft.Design#CA1001%3b-Microsoft.Design#CA1049%3b-Microsoft.Design#CA1054%3b-Microsoft.Design#CA1056%3b-Microsoft.Design#CA1055%3b-Microsoft.Design#CA1030%3b-Microsoft.Design#CA1003%3b-Microsoft.Design#CA1007%3b-Microsoft.Design#CA1043%3b-Microsoft.Design#CA1024%3b-Microsoft.Design#CA1062%3b-Microsoft.Globalization#CA1301%3b-Microsoft.Globalization#CA1302%3b-Microsoft.Globalization#CA1303%3b-Microsoft.Globalization#CA1306%3b-Microsoft.Globalization#CA1304%3b-Microsoft.Globalization#CA1305%3b-Microsoft.Globalization#CA1300%3b-Microsoft.Maintainability#CA1502%3b-Microsoft.Maintainability#CA1501%3b-Microsoft.Maintainability#CA1500%3b-Microsoft.Naming#CA1718%3b-Microsoft.Naming#CA1720%3b-Microsoft.Naming#CA1700%3b-Microsoft.Naming#CA1712%3b-Microsoft.Naming#CA1713%3b-Microsoft.Naming#CA1709%3b-Microsoft.Naming#CA1708%3b-Microsoft.Naming#CA1715%3b-Microsoft.Naming#CA1710%3b-Microsoft.Naming#CA1707%3b-Microsoft.Naming#CA1722%3b-Microsoft.Naming#CA1711%3b-Microsoft.Naming#CA1716%3b-Microsoft.Naming#CA1705%3b-Microsoft.Naming#CA1725%3b-Microsoft.Naming#CA1719%3b-Microsoft.Naming#CA1721%3b-Microsoft.Naming#CA1706%3b-Microsoft.Naming#CA1724%3b-Microsoft.Naming#CA1726%3b-Microsoft.Performance#CA1809%3b-Microsoft.Performance#CA1811%3b-Microsoft.Performance#CA1812%3b-Microsoft.Performance#CA1807%3b-Microsoft.Performance#CA1813%3b-Microsoft.Performance#CA1823%3b-Microsoft.Performance#CA1816%3b-Microsoft.Performance#CA1817%3b-Microsoft.Performance#CA1800%3b-Microsoft.Performance#CA1818%3b-Microsoft.Performance#CA1805%3b-Microsoft.Performance#CA1810%3b-Microsoft.Performance#CA1822%3b-Microsoft.Performance#CA1815%3b-Microsoft.Performance#CA1814%3b-Microsoft.Performance#CA1819%3b-Microsoft.Performance#CA1804%3b-Microsoft.Performance#CA1820%3b-Microsoft.Performance#CA1802%3b-Microsoft.Security#CA2116%3b-Microsoft.Security#CA2117%3b-Microsoft.Security#CA2105%3b-Microsoft.Security#CA2115%3b-Microsoft.Security#CA2104%3b-Microsoft.Security#CA2122%3b-Microsoft.Security#CA2114%3b-Microsoft.Security#CA2123%3b-Microsoft.Security#CA2111%3b-Microsoft.Security#CA2108%3b-Microsoft.Security#CA2107%3b-Microsoft.Security#CA2103%3b-Microsoft.Security#CA2100%3b-Microsoft.Security#CA2118%3b-Microsoft.Security#CA2109%3b-Microsoft.Security#CA2119%3b-Microsoft.Security#CA2106%3b-Microsoft.Security#CA2112%3b-Microsoft.Security#CA2110%3b-Microsoft.Security#CA2120%3b-Microsoft.Security#CA2101%3b-Microsoft.Security#CA2121%3b-Microsoft.Security#CA2126%3b-Microsoft.Security#CA2124%3b-Microsoft.Usage#CA2209%3b-Microsoft.Usage#CA2236%3b-Microsoft.Usage#CA2227%3b-Microsoft.Usage#CA2213%3b-Microsoft.Usage#CA2216%3b-Microsoft.Usage#CA2215%3b-Microsoft.Usage#CA2214%3b-Microsoft.Usage#CA2222%3b-Microsoft.Usage#CA2202%3b-Microsoft.Usage#CA1806%3b-Microsoft.Usage#CA2217%3b-Microsoft.Usage#CA2212%3b-Microsoft.Usage#CA2219%3b-Microsoft.Usage#CA2201%3b-Microsoft.Usage#CA2228%3b-Microsoft.Usage#CA2221%3b-Microsoft.Usage#CA2220%3b-Microsoft.Usage#CA2240%3b-Microsoft.Usage#CA2229%3b-Microsoft.Usage#CA2238%3b-Microsoft.Usage#CA2207%3b-Microsoft.Usage#CA2208%3b-Microsoft.Usage#CA2235%3b-Microsoft.Usage#CA2237%3b-Microsoft.Usage#CA2232%3b-Microsoft.Usage#CA2223%3b-Microsoft.Usage#CA2211%3b-Microsoft.Usage#CA2233%3b-Microsoft.Usage#CA2225%3b-Microsoft.Usage#CA2226%3b-Microsoft.Usage#CA2231%3b-Microsoft.Usage#CA2224%3b-Microsoft.Usage#CA2218%3b-Microsoft.Usage#CA2234%3b-Microsoft.Usage#CA2241%3b-Microsoft.Usage#CA2239%3b-Microsoft.Usage#CA2200%3b-Microsoft.Usage#CA1801%3b-Microsoft.Usage#CA2205%3b-Microsoft.Usage#CA2230</CodeAnalysisRules>
<CodeAnalysisRules>-Microsoft.Design#CA1012;-Microsoft.Design#CA2210;-Microsoft.Design#CA1040;-Microsoft.Design#CA1005;-Microsoft.Design#CA1020;-Microsoft.Design#CA1021;-Microsoft.Design#CA1010;-Microsoft.Design#CA1011;-Microsoft.Design#CA1009;-Microsoft.Design#CA1050;-Microsoft.Design#CA1026;-Microsoft.Design#CA1019;-Microsoft.Design#CA1031;-Microsoft.Design#CA1047;-Microsoft.Design#CA1000;-Microsoft.Design#CA1048;-Microsoft.Design#CA1051;-Microsoft.Design#CA1002;-Microsoft.Design#CA1061;-Microsoft.Design#CA1006;-Microsoft.Design#CA1046;-Microsoft.Design#CA1045;-Microsoft.Design#CA1038;-Microsoft.Design#CA1008;-Microsoft.Design#CA1028;-Microsoft.Design#CA1004;-Microsoft.Design#CA1035;-Microsoft.Design#CA1063;-Microsoft.Design#CA1032;-Microsoft.Design#CA1023;-Microsoft.Design#CA1033;-Microsoft.Design#CA1039;-Microsoft.Design#CA1016;-Microsoft.Design#CA1014;-Microsoft.Design#CA1017;-Microsoft.Design#CA1018;-Microsoft.Design#CA1027;-Microsoft.Design#CA1059;-Microsoft.Design#CA1060;-Microsoft.Design#CA1034;-Microsoft.Design#CA1013;-Microsoft.Design#CA1036;-Microsoft.Design#CA1044;-Microsoft.Design#CA1041;-Microsoft.Design#CA1025;-Microsoft.Design#CA1052;-Microsoft.Design#CA1053;-Microsoft.Design#CA1057;-Microsoft.Design#CA1058;-Microsoft.Design#CA1001;-Microsoft.Design#CA1049;-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055;-Microsoft.Design#CA1030;-Microsoft.Design#CA1003;-Microsoft.Design#CA1007;-Microsoft.Design#CA1043;-Microsoft.Design#CA1024;-Microsoft.Design#CA1062;-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Maintainability#CA1502;-Microsoft.Maintainability#CA1501;-Microsoft.Maintainability#CA1500;-Microsoft.Naming#CA1718;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1705;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1706;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726;-Microsoft.Performance#CA1809;-Microsoft.Performance#CA1811;-Microsoft.Performance#CA1812;-Microsoft.Performance#CA1807;-Microsoft.Performance#CA1813;-Microsoft.Performance#CA1823;-Microsoft.Performance#CA1816;-Microsoft.Performance#CA1817;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1818;-Microsoft.Performance#CA1805;-Microsoft.Performance#CA1810;-Microsoft.Performance#CA1822;-Microsoft.Performance#CA1815;-Microsoft.Performance#CA1814;-Microsoft.Performance#CA1819;-Microsoft.Performance#CA1804;-Microsoft.Performance#CA1820;-Microsoft.Performance#CA1802;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2100;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2110;-Microsoft.Security#CA2120;-Microsoft.Security#CA2101;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124;-Microsoft.Usage#CA2209;-Microsoft.Usage#CA2236;-Microsoft.Usage#CA2227;-Microsoft.Usage#CA2213;-Microsoft.Usage#CA2216;-Microsoft.Usage#CA2215;-Microsoft.Usage#CA2214;-Microsoft.Usage#CA2222;-Microsoft.Usage#CA2202;-Microsoft.Usage#CA1806;-Microsoft.Usage#CA2217;-Microsoft.Usage#CA2212;-Microsoft.Usage#CA2219;-Microsoft.Usage#CA2201;-Microsoft.Usage#CA2228;-Microsoft.Usage#CA2221;-Microsoft.Usage#CA2220;-Microsoft.Usage#CA2240;-Microsoft.Usage#CA2229;-Microsoft.Usage#CA2238;-Microsoft.Usage#CA2207;-Microsoft.Usage#CA2208;-Microsoft.Usage#CA2235;-Microsoft.Usage#CA2237;-Microsoft.Usage#CA2232;-Microsoft.Usage#CA2223;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2233;-Microsoft.Usage#CA2225;-Microsoft.Usage#CA2226;-Microsoft.Usage#CA2231;-Microsoft.Usage#CA2224;-Microsoft.Usage#CA2218;-Microsoft.Usage#CA2234;-Microsoft.Usage#CA2241;-Microsoft.Usage#CA2239;-Microsoft.Usage#CA2200;-Microsoft.Usage#CA1801;-Microsoft.Usage#CA2205;-Microsoft.Usage#CA2230</CodeAnalysisRules>
<DebugType>Full</DebugType>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
</PropertyGroup>
@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>101187584</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<DefineConstants>TRACE%3bFRAMEWORK_VER_2x</DefineConstants>
<DefineConstants>TRACE;FRAMEWORK_VER_2x</DefineConstants>
<DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>

2
src/Libraries/ICSharpCode.Build.Tasks/Project/ICSharpCode.Build.Tasks.csproj

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>..\..\..\..\bin\</OutputPath>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>False</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

2
src/Libraries/ICSharpCode.TextEditor/Project/ICSharpCode.TextEditor.csproj

@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
<OutputPath>..\..\..\..\bin\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<CodeAnalysisRules>-Microsoft.Design#CA1012%3b-Microsoft.Design#CA2210%3b-Microsoft.Design#CA1040%3b-Microsoft.Design#CA1005%3b-Microsoft.Design#CA1020%3b-Microsoft.Design#CA1021%3b-Microsoft.Design#CA1010%3b-Microsoft.Design#CA1011%3b-Microsoft.Design#CA1009%3b-Microsoft.Design#CA1050%3b-Microsoft.Design#CA1026%3b-Microsoft.Design#CA1019%3b-Microsoft.Design#CA1031%3b-Microsoft.Design#CA1047%3b-Microsoft.Design#CA1000%3b-Microsoft.Design#CA1048%3b-Microsoft.Design#CA1051%3b-Microsoft.Design#CA1002%3b-Microsoft.Design#CA1061%3b-Microsoft.Design#CA1006%3b-Microsoft.Design#CA1046%3b-Microsoft.Design#CA1045%3b-Microsoft.Design#CA1038%3b-Microsoft.Design#CA1008%3b-Microsoft.Design#CA1028%3b-Microsoft.Design#CA1004%3b-Microsoft.Design#CA1035%3b-Microsoft.Design#CA1063%3b-Microsoft.Design#CA1032%3b-Microsoft.Design#CA1023%3b-Microsoft.Design#CA1033%3b-Microsoft.Design#CA1039%3b-Microsoft.Design#CA1016%3b-Microsoft.Design#CA1014%3b-Microsoft.Design#CA1017%3b-Microsoft.Design#CA1018%3b-Microsoft.Design#CA1027%3b-Microsoft.Design#CA1059%3b-Microsoft.Design#CA1060%3b-Microsoft.Design#CA1034%3b-Microsoft.Design#CA1013%3b-Microsoft.Design#CA1036%3b-Microsoft.Design#CA1044%3b-Microsoft.Design#CA1041%3b-Microsoft.Design#CA1025%3b-Microsoft.Design#CA1052%3b-Microsoft.Design#CA1053%3b-Microsoft.Design#CA1057%3b-Microsoft.Design#CA1058%3b-Microsoft.Design#CA1001%3b-Microsoft.Design#CA1049%3b-Microsoft.Design#CA1054%3b-Microsoft.Design#CA1056%3b-Microsoft.Design#CA1055%3b-Microsoft.Design#CA1030%3b-Microsoft.Design#CA1003%3b-Microsoft.Design#CA1007%3b-Microsoft.Design#CA1043%3b-Microsoft.Design#CA1024%3b-Microsoft.Design#CA1062%3b-Microsoft.Globalization#CA1301%3b-Microsoft.Globalization#CA1302%3b-Microsoft.Globalization#CA1303%3b-Microsoft.Globalization#CA1306%3b-Microsoft.Globalization#CA1304%3b-Microsoft.Globalization#CA1305%3b-Microsoft.Globalization#CA1300%3b-Microsoft.Mobility#CA1600%3b-Microsoft.Mobility#CA1601%3b-Microsoft.Naming#CA1718%3b-Microsoft.Naming#CA1720%3b-Microsoft.Naming#CA1700%3b-Microsoft.Naming#CA1712%3b-Microsoft.Naming#CA1713%3b-Microsoft.Naming#CA1709%3b-Microsoft.Naming#CA1708%3b-Microsoft.Naming#CA1715%3b-Microsoft.Naming#CA1710%3b-Microsoft.Naming#CA1707%3b-Microsoft.Naming#CA1722%3b-Microsoft.Naming#CA1711%3b-Microsoft.Naming#CA1716%3b-Microsoft.Naming#CA1705%3b-Microsoft.Naming#CA1725%3b-Microsoft.Naming#CA1719%3b-Microsoft.Naming#CA1721%3b-Microsoft.Naming#CA1706%3b-Microsoft.Naming#CA1724%3b-Microsoft.Naming#CA1726%3b-Microsoft.Performance#CA1809%3b-Microsoft.Performance#CA1811%3b-Microsoft.Performance#CA1812%3b-Microsoft.Performance#CA1807%3b-Microsoft.Performance#CA1813%3b-Microsoft.Performance#CA1823%3b-Microsoft.Performance#CA1816%3b-Microsoft.Performance#CA1817%3b-Microsoft.Performance#CA1800%3b-Microsoft.Performance#CA1818%3b-Microsoft.Performance#CA1805%3b-Microsoft.Performance#CA1810%3b-Microsoft.Performance#CA1822%3b-Microsoft.Performance#CA1815%3b-Microsoft.Performance#CA1814%3b-Microsoft.Performance#CA1819%3b-Microsoft.Performance#CA1804%3b-Microsoft.Performance#CA1820%3b-Microsoft.Performance#CA1802%3b-Microsoft.Security#CA2116%3b-Microsoft.Security#CA2117%3b-Microsoft.Security#CA2105%3b-Microsoft.Security#CA2115%3b-Microsoft.Security#CA2104%3b-Microsoft.Security#CA2122%3b-Microsoft.Security#CA2114%3b-Microsoft.Security#CA2123%3b-Microsoft.Security#CA2111%3b-Microsoft.Security#CA2108%3b-Microsoft.Security#CA2107%3b-Microsoft.Security#CA2103%3b-Microsoft.Security#CA2100%3b-Microsoft.Security#CA2118%3b-Microsoft.Security#CA2109%3b-Microsoft.Security#CA2119%3b-Microsoft.Security#CA2106%3b-Microsoft.Security#CA2112%3b-Microsoft.Security#CA2110%3b-Microsoft.Security#CA2120%3b-Microsoft.Security#CA2101%3b-Microsoft.Security#CA2121%3b-Microsoft.Security#CA2126%3b-Microsoft.Security#CA2124%3b-Microsoft.Usage#CA2209%3b-Microsoft.Usage#CA2236%3b-Microsoft.Usage#CA2227%3b-Microsoft.Usage#CA2213%3b-Microsoft.Usage#CA2216%3b-Microsoft.Usage#CA2215%3b-Microsoft.Usage#CA2214%3b-Microsoft.Usage#CA2222%3b-Microsoft.Usage#CA2202%3b-Microsoft.Usage#CA1806%3b-Microsoft.Usage#CA2217%3b-Microsoft.Usage#CA2212%3b-Microsoft.Usage#CA2219%3b-Microsoft.Usage#CA2201%3b-Microsoft.Usage#CA2228%3b-Microsoft.Usage#CA2221%3b-Microsoft.Usage#CA2220%3b-Microsoft.Usage#CA2240%3b-Microsoft.Usage#CA2229%3b-Microsoft.Usage#CA2238%3b-Microsoft.Usage#CA2207%3b-Microsoft.Usage#CA2208%3b-Microsoft.Usage#CA2235%3b-Microsoft.Usage#CA2237%3b-Microsoft.Usage#CA2232%3b-Microsoft.Usage#CA2223%3b-Microsoft.Usage#CA2211%3b-Microsoft.Usage#CA2233%3b-Microsoft.Usage#CA2225%3b-Microsoft.Usage#CA2226%3b-Microsoft.Usage#CA2231%3b-Microsoft.Usage#CA2224%3b-Microsoft.Usage#CA2218%3b-Microsoft.Usage#CA2234%3b-Microsoft.Usage#CA2241%3b-Microsoft.Usage#CA2239%3b-Microsoft.Usage#CA2200%3b-Microsoft.Usage#CA1801%3b-Microsoft.Usage#CA2205%3b-Microsoft.Usage#CA2230</CodeAnalysisRules>
<CodeAnalysisRules>-Microsoft.Design#CA1012;-Microsoft.Design#CA2210;-Microsoft.Design#CA1040;-Microsoft.Design#CA1005;-Microsoft.Design#CA1020;-Microsoft.Design#CA1021;-Microsoft.Design#CA1010;-Microsoft.Design#CA1011;-Microsoft.Design#CA1009;-Microsoft.Design#CA1050;-Microsoft.Design#CA1026;-Microsoft.Design#CA1019;-Microsoft.Design#CA1031;-Microsoft.Design#CA1047;-Microsoft.Design#CA1000;-Microsoft.Design#CA1048;-Microsoft.Design#CA1051;-Microsoft.Design#CA1002;-Microsoft.Design#CA1061;-Microsoft.Design#CA1006;-Microsoft.Design#CA1046;-Microsoft.Design#CA1045;-Microsoft.Design#CA1038;-Microsoft.Design#CA1008;-Microsoft.Design#CA1028;-Microsoft.Design#CA1004;-Microsoft.Design#CA1035;-Microsoft.Design#CA1063;-Microsoft.Design#CA1032;-Microsoft.Design#CA1023;-Microsoft.Design#CA1033;-Microsoft.Design#CA1039;-Microsoft.Design#CA1016;-Microsoft.Design#CA1014;-Microsoft.Design#CA1017;-Microsoft.Design#CA1018;-Microsoft.Design#CA1027;-Microsoft.Design#CA1059;-Microsoft.Design#CA1060;-Microsoft.Design#CA1034;-Microsoft.Design#CA1013;-Microsoft.Design#CA1036;-Microsoft.Design#CA1044;-Microsoft.Design#CA1041;-Microsoft.Design#CA1025;-Microsoft.Design#CA1052;-Microsoft.Design#CA1053;-Microsoft.Design#CA1057;-Microsoft.Design#CA1058;-Microsoft.Design#CA1001;-Microsoft.Design#CA1049;-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055;-Microsoft.Design#CA1030;-Microsoft.Design#CA1003;-Microsoft.Design#CA1007;-Microsoft.Design#CA1043;-Microsoft.Design#CA1024;-Microsoft.Design#CA1062;-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Naming#CA1718;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1705;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1706;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726;-Microsoft.Performance#CA1809;-Microsoft.Performance#CA1811;-Microsoft.Performance#CA1812;-Microsoft.Performance#CA1807;-Microsoft.Performance#CA1813;-Microsoft.Performance#CA1823;-Microsoft.Performance#CA1816;-Microsoft.Performance#CA1817;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1818;-Microsoft.Performance#CA1805;-Microsoft.Performance#CA1810;-Microsoft.Performance#CA1822;-Microsoft.Performance#CA1815;-Microsoft.Performance#CA1814;-Microsoft.Performance#CA1819;-Microsoft.Performance#CA1804;-Microsoft.Performance#CA1820;-Microsoft.Performance#CA1802;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2100;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2110;-Microsoft.Security#CA2120;-Microsoft.Security#CA2101;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124;-Microsoft.Usage#CA2209;-Microsoft.Usage#CA2236;-Microsoft.Usage#CA2227;-Microsoft.Usage#CA2213;-Microsoft.Usage#CA2216;-Microsoft.Usage#CA2215;-Microsoft.Usage#CA2214;-Microsoft.Usage#CA2222;-Microsoft.Usage#CA2202;-Microsoft.Usage#CA1806;-Microsoft.Usage#CA2217;-Microsoft.Usage#CA2212;-Microsoft.Usage#CA2219;-Microsoft.Usage#CA2201;-Microsoft.Usage#CA2228;-Microsoft.Usage#CA2221;-Microsoft.Usage#CA2220;-Microsoft.Usage#CA2240;-Microsoft.Usage#CA2229;-Microsoft.Usage#CA2238;-Microsoft.Usage#CA2207;-Microsoft.Usage#CA2208;-Microsoft.Usage#CA2235;-Microsoft.Usage#CA2237;-Microsoft.Usage#CA2232;-Microsoft.Usage#CA2223;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2233;-Microsoft.Usage#CA2225;-Microsoft.Usage#CA2226;-Microsoft.Usage#CA2231;-Microsoft.Usage#CA2224;-Microsoft.Usage#CA2218;-Microsoft.Usage#CA2234;-Microsoft.Usage#CA2241;-Microsoft.Usage#CA2239;-Microsoft.Usage#CA2200;-Microsoft.Usage#CA1801;-Microsoft.Usage#CA2205;-Microsoft.Usage#CA2230</CodeAnalysisRules>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>True</Optimize>

4
src/Libraries/NRefactory/Project/NRefactory.csproj

@ -23,12 +23,12 @@ @@ -23,12 +23,12 @@
<FileAlignment>4096</FileAlignment>
<PreBuildEvent>..\src\Tools\UpdateAssemblyInfo\bin\Debug\UpdateAssemblyInfo.exe</PreBuildEvent>
<RunCodeAnalysis>False</RunCodeAnalysis>
<CodeAnalysisRules>-Microsoft.Design#CA1002%3b-Microsoft.Design#CA1020%3b-Microsoft.Design#CA1051%3b-Microsoft.Design#CA1062%3b-Microsoft.Globalization#CA1303%3b-Microsoft.Globalization#CA1305%3b-Microsoft.Naming#CA1704%3b-Microsoft.Performance#CA1800%3b-Microsoft.Performance#CA1805%3b-Microsoft.Usage#CA2211%3b-Microsoft.Usage#CA2227</CodeAnalysisRules>
<CodeAnalysisRules>-Microsoft.Design#CA1002;-Microsoft.Design#CA1020;-Microsoft.Design#CA1051;-Microsoft.Design#CA1062;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1305;-Microsoft.Naming#CA1704;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1805;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2227</CodeAnalysisRules>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>TEST%3b DEBUG</DefineConstants>
<DefineConstants>TEST; DEBUG</DefineConstants>
<OutputPath>..\..\..\..\bin\</OutputPath>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>

474
src/Main/Base/Test/GenericResolverTests.cs

@ -14,242 +14,242 @@ namespace ICSharpCode.SharpDevelop.Tests @@ -14,242 +14,242 @@ namespace ICSharpCode.SharpDevelop.Tests
[TestFixture]
public class GenericResolverTests
{
#region Test helper methods
NRefactoryResolverTests nrrt = new NRefactoryResolverTests();
ResolveResult Resolve(string program, string expression, int line)
{
return nrrt.Resolve(program, expression, line);
}
ResolveResult ResolveVB(string program, string expression, int line)
{
return nrrt.ResolveVB(program, expression, line);
}
#endregion
#region Generic references
const string listProgram = @"using System.Collections.Generic;
class TestClass {
void Method() {
List<TestClass> list = new List<TestClass>();
}
T CloneIt<T>(T source) where T : ICloneable {
if (source == null) return new TestClass();
return source.Clone();
}
public int PublicField;
}
";
[Test]
public void ListAddTest()
{
ResolveResult result = Resolve(listProgram, "list.Add(new A())", 5);
Assert.IsNotNull(result);
Assert.IsTrue(result is MemberResolveResult);
IMethod m = (IMethod)((MemberResolveResult)result).ResolvedMember;
Assert.AreEqual(1, m.Parameters.Count);
Assert.AreEqual("TestClass", m.Parameters[0].ReturnType.FullyQualifiedName);
}
[Test]
public void ListAddRangeTest()
{
ResolveResult result = Resolve(listProgram, "list.AddRange(new A[0])", 5);
Assert.IsNotNull(result);
Assert.IsTrue(result is MemberResolveResult);
IMethod m = (IMethod)((MemberResolveResult)result).ResolvedMember;
Assert.AreEqual(1, m.Parameters.Count);
Assert.IsTrue(m.Parameters[0].ReturnType is ConstructedReturnType);
Assert.AreEqual("System.Collections.Generic.IEnumerable", m.Parameters[0].ReturnType.FullyQualifiedName);
Assert.AreEqual("TestClass", ((ConstructedReturnType)m.Parameters[0].ReturnType).TypeArguments[0].FullyQualifiedName);
}
[Test]
public void ListToArrayTest()
{
ResolveResult result = Resolve(listProgram, "list.ToArray()", 5);
Assert.IsNotNull(result);
Assert.IsTrue(result is MemberResolveResult);
IMethod m = (IMethod)((MemberResolveResult)result).ResolvedMember;
Assert.AreEqual("TestClass", m.ReturnType.FullyQualifiedName);
Assert.AreEqual(1, m.ReturnType.CastToArrayReturnType().ArrayDimensions);
}
[Test]
public void ClassReferenceTest()
{
ResolveResult result = Resolve(listProgram, "List<string>", 5);
Assert.IsNotNull(result);
Assert.IsTrue(result is TypeResolveResult);
Assert.AreEqual("System.Collections.Generic.List", ((TypeResolveResult)result).ResolvedClass.FullyQualifiedName);
Assert.IsTrue(result.ResolvedType is ConstructedReturnType);
Assert.AreEqual("System.String", ((ConstructedReturnType)result.ResolvedType).TypeArguments[0].FullyQualifiedName);
}
[Test]
public void GenericMethodCallTest()
{
ResolveResult result = Resolve(listProgram, "CloneIt<TestClass>(null)", 5);
Assert.IsNotNull(result);
Assert.IsTrue(result is MemberResolveResult);
Assert.AreEqual("TestClass", result.ResolvedType.FullyQualifiedName);
MemberResolveResult mrr = (MemberResolveResult) result;
Assert.AreEqual("TestClass.CloneIt", mrr.ResolvedMember.FullyQualifiedName);
}
[Test]
public void FieldReferenceOnGenericMethodTest()
{
ResolveResult result = Resolve(listProgram, "CloneIt<TestClass>(null).PublicField", 5);
Assert.IsNotNull(result);
Assert.IsTrue(result is MemberResolveResult);
Assert.AreEqual("System.Int32", result.ResolvedType.FullyQualifiedName);
MemberResolveResult mrr = (MemberResolveResult) result;
Assert.AreEqual("TestClass.PublicField", mrr.ResolvedMember.FullyQualifiedName);
}
[Test]
public void TypeInferredGenericMethodCallTest()
{
ResolveResult result = Resolve(listProgram, "CloneIt(new TestClass())", 5);
Assert.IsNotNull(result);
Assert.IsTrue(result is MemberResolveResult);
Assert.AreEqual("TestClass", result.ResolvedType.FullyQualifiedName);
MemberResolveResult mrr = (MemberResolveResult) result;
Assert.AreEqual("TestClass.CloneIt", mrr.ResolvedMember.FullyQualifiedName);
}
[Test]
public void FieldReferenceOnTypeInferredGenericMethodCallTest()
{
ResolveResult result = Resolve(listProgram, "CloneIt(new TestClass()).PublicField", 5);
Assert.IsNotNull(result);
Assert.IsTrue(result is MemberResolveResult);
Assert.AreEqual("System.Int32", result.ResolvedType.FullyQualifiedName);
MemberResolveResult mrr = (MemberResolveResult) result;
Assert.AreEqual("TestClass.PublicField", mrr.ResolvedMember.FullyQualifiedName);
}
[Test]
public void ImportAliasClassResolveTest()
{
string program = @"using COL = System.Collections.Generic.List<string>;
class TestClass {
void Test() {
COL a = new COL();
}
}
";
TypeResolveResult rr = Resolve(program, "COL", 4) as TypeResolveResult;
Assert.AreEqual("System.Collections.Generic.List", rr.ResolvedClass.FullyQualifiedName, "COL");
Assert.AreEqual("System.Collections.Generic.List{System.String}", rr.ResolvedType.DotNetName, "COL");
LocalResolveResult lr = Resolve(program, "a", 5) as LocalResolveResult;
Assert.AreEqual("System.Collections.Generic.List{System.String}", lr.ResolvedType.DotNetName, "a");
}
[Test]
public void InheritFromGenericClass()
{
string program = @"using System;
class BaseClass<T> {
public T value;
}
class DerivedClass : BaseClass<string> {
}";
MemberResolveResult rr = Resolve(program, "value", 6) as MemberResolveResult;
Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
}
[Test]
public void CrossTypeParametersInheritance()
{
string program = @"using System;
class BaseClass<A,B> {
public A a;
public B b;
}
class DerivedClass<A,B> : BaseClass<B,A> {
}";
MemberResolveResult rr = Resolve(program, "a", 7) as MemberResolveResult;
Assert.AreEqual("B", rr.ResolvedType.Name);
rr = Resolve(program, "b", 7) as MemberResolveResult;
Assert.AreEqual("A", rr.ResolvedType.Name);
}
#endregion
#region CodeCompletion inside generic classes
const string genericClass = @"using System;
public class GenericClass<T> where T : IDisposable
void Method<G>(T par1, G par2) where G : IConvertible, IFormattable {
T var1; G var2;
}
}
";
[Test]
public void ClassTypeParameterResolveType()
{
ResolveResult rr = Resolve(genericClass, "T", 5);
Assert.IsNotNull(rr);
Assert.IsTrue(rr is TypeResolveResult);
Assert.IsNull((rr as TypeResolveResult).ResolvedClass);
Assert.IsTrue(rr.ResolvedType is GenericReturnType);
}
[Test]
public void ClassTypeParameterResolveVariable()
{
ResolveResult rr = Resolve(genericClass, "var1", 5);
Assert.IsNotNull(rr);
Assert.IsTrue(rr is LocalResolveResult);
Assert.IsTrue(rr.ResolvedType is GenericReturnType);
}
[Test]
public void ClassTypeParameterResolveParameter()
{
ResolveResult rr = Resolve(genericClass, "par1", 5);
Assert.IsNotNull(rr);
Assert.IsTrue(rr is LocalResolveResult);
Assert.IsTrue(rr.ResolvedType is GenericReturnType);
}
[Test]
public void MethodTypeParameterResolveType()
{
ResolveResult rr = Resolve(genericClass, "G", 5);
Assert.IsNotNull(rr);
Assert.IsTrue(rr is TypeResolveResult);
Assert.IsNull((rr as TypeResolveResult).ResolvedClass);
Assert.IsTrue(rr.ResolvedType is GenericReturnType);
}
[Test]
public void MethodTypeParameterResolveVariable()
{
ResolveResult rr = Resolve(genericClass, "var2", 5);
Assert.IsNotNull(rr);
Assert.IsTrue(rr is LocalResolveResult);
Assert.IsTrue(rr.ResolvedType is GenericReturnType);
}
[Test]
public void MethodTypeParameterResolveParameter()
{
ResolveResult rr = Resolve(genericClass, "par2", 5);
Assert.IsNotNull(rr);
Assert.IsTrue(rr is LocalResolveResult);
Assert.IsTrue(rr.ResolvedType is GenericReturnType);
}
#endregion
// #region Test helper methods
// NRefactoryResolverTests nrrt = new NRefactoryResolverTests();
//
// ResolveResult Resolve(string program, string expression, int line)
// {
// return nrrt.Resolve(program, expression, line);
// }
//
// ResolveResult ResolveVB(string program, string expression, int line)
// {
// return nrrt.ResolveVB(program, expression, line);
// }
// #endregion
//
// #region Generic references
// const string listProgram = @"using System.Collections.Generic;
//class TestClass {
// void Method() {
// List<TestClass> list = new List<TestClass>();
//
// }
//
// T CloneIt<T>(T source) where T : ICloneable {
// if (source == null) return new TestClass();
// return source.Clone();
// }
//
// public int PublicField;
//}
//";
//
// [Test]
// public void ListAddTest()
// {
// ResolveResult result = Resolve(listProgram, "list.Add(new A())", 5);
// Assert.IsNotNull(result);
// Assert.IsTrue(result is MemberResolveResult);
// IMethod m = (IMethod)((MemberResolveResult)result).ResolvedMember;
// Assert.AreEqual(1, m.Parameters.Count);
// Assert.AreEqual("TestClass", m.Parameters[0].ReturnType.FullyQualifiedName);
// }
//
// [Test]
// public void ListAddRangeTest()
// {
// ResolveResult result = Resolve(listProgram, "list.AddRange(new A[0])", 5);
// Assert.IsNotNull(result);
// Assert.IsTrue(result is MemberResolveResult);
// IMethod m = (IMethod)((MemberResolveResult)result).ResolvedMember;
// Assert.AreEqual(1, m.Parameters.Count);
// Assert.IsTrue(m.Parameters[0].ReturnType is ConstructedReturnType);
// Assert.AreEqual("System.Collections.Generic.IEnumerable", m.Parameters[0].ReturnType.FullyQualifiedName);
// Assert.AreEqual("TestClass", ((ConstructedReturnType)m.Parameters[0].ReturnType).TypeArguments[0].FullyQualifiedName);
// }
//
// [Test]
// public void ListToArrayTest()
// {
// ResolveResult result = Resolve(listProgram, "list.ToArray()", 5);
// Assert.IsNotNull(result);
// Assert.IsTrue(result is MemberResolveResult);
// IMethod m = (IMethod)((MemberResolveResult)result).ResolvedMember;
// Assert.AreEqual("TestClass", m.ReturnType.FullyQualifiedName);
// Assert.AreEqual(1, m.ReturnType.CastToArrayReturnType().ArrayDimensions);
// }
//
// [Test]
// public void ClassReferenceTest()
// {
// ResolveResult result = Resolve(listProgram, "List<string>", 5);
// Assert.IsNotNull(result);
// Assert.IsTrue(result is TypeResolveResult);
// Assert.AreEqual("System.Collections.Generic.List", ((TypeResolveResult)result).ResolvedClass.FullyQualifiedName);
// Assert.IsTrue(result.ResolvedType is ConstructedReturnType);
// Assert.AreEqual("System.String", ((ConstructedReturnType)result.ResolvedType).TypeArguments[0].FullyQualifiedName);
// }
//
// [Test]
// public void GenericMethodCallTest()
// {
// ResolveResult result = Resolve(listProgram, "CloneIt<TestClass>(null)", 5);
// Assert.IsNotNull(result);
// Assert.IsTrue(result is MemberResolveResult);
// Assert.AreEqual("TestClass", result.ResolvedType.FullyQualifiedName);
// MemberResolveResult mrr = (MemberResolveResult) result;
// Assert.AreEqual("TestClass.CloneIt", mrr.ResolvedMember.FullyQualifiedName);
// }
//
// [Test]
// public void FieldReferenceOnGenericMethodTest()
// {
// ResolveResult result = Resolve(listProgram, "CloneIt<TestClass>(null).PublicField", 5);
// Assert.IsNotNull(result);
// Assert.IsTrue(result is MemberResolveResult);
// Assert.AreEqual("System.Int32", result.ResolvedType.FullyQualifiedName);
// MemberResolveResult mrr = (MemberResolveResult) result;
// Assert.AreEqual("TestClass.PublicField", mrr.ResolvedMember.FullyQualifiedName);
// }
//
// [Test]
// public void TypeInferredGenericMethodCallTest()
// {
// ResolveResult result = Resolve(listProgram, "CloneIt(new TestClass())", 5);
// Assert.IsNotNull(result);
// Assert.IsTrue(result is MemberResolveResult);
// Assert.AreEqual("TestClass", result.ResolvedType.FullyQualifiedName);
// MemberResolveResult mrr = (MemberResolveResult) result;
// Assert.AreEqual("TestClass.CloneIt", mrr.ResolvedMember.FullyQualifiedName);
// }
//
// [Test]
// public void FieldReferenceOnTypeInferredGenericMethodCallTest()
// {
// ResolveResult result = Resolve(listProgram, "CloneIt(new TestClass()).PublicField", 5);
// Assert.IsNotNull(result);
// Assert.IsTrue(result is MemberResolveResult);
// Assert.AreEqual("System.Int32", result.ResolvedType.FullyQualifiedName);
// MemberResolveResult mrr = (MemberResolveResult) result;
// Assert.AreEqual("TestClass.PublicField", mrr.ResolvedMember.FullyQualifiedName);
// }
//
// [Test]
// public void ImportAliasClassResolveTest()
// {
// string program = @"using COL = System.Collections.Generic.List<string>;
//class TestClass {
// void Test() {
// COL a = new COL();
//
// }
//}
//";
// TypeResolveResult rr = Resolve(program, "COL", 4) as TypeResolveResult;
// Assert.AreEqual("System.Collections.Generic.List", rr.ResolvedClass.FullyQualifiedName, "COL");
// Assert.AreEqual("System.Collections.Generic.List{System.String}", rr.ResolvedType.DotNetName, "COL");
// LocalResolveResult lr = Resolve(program, "a", 5) as LocalResolveResult;
// Assert.AreEqual("System.Collections.Generic.List{System.String}", lr.ResolvedType.DotNetName, "a");
// }
//
// [Test]
// public void InheritFromGenericClass()
// {
// string program = @"using System;
//class BaseClass<T> {
// public T value;
//}
//class DerivedClass : BaseClass<string> {
//
//}";
// MemberResolveResult rr = Resolve(program, "value", 6) as MemberResolveResult;
// Assert.AreEqual("System.String", rr.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void CrossTypeParametersInheritance()
// {
// string program = @"using System;
//class BaseClass<A,B> {
// public A a;
// public B b;
//}
//class DerivedClass<A,B> : BaseClass<B,A> {
//
//}";
// MemberResolveResult rr = Resolve(program, "a", 7) as MemberResolveResult;
// Assert.AreEqual("B", rr.ResolvedType.Name);
// rr = Resolve(program, "b", 7) as MemberResolveResult;
// Assert.AreEqual("A", rr.ResolvedType.Name);
// }
// #endregion
//
// #region CodeCompletion inside generic classes
// const string genericClass = @"using System;
//public class GenericClass<T> where T : IDisposable
// void Method<G>(T par1, G par2) where G : IConvertible, IFormattable {
// T var1; G var2;
//
// }
//}
//";
//
// [Test]
// public void ClassTypeParameterResolveType()
// {
// ResolveResult rr = Resolve(genericClass, "T", 5);
// Assert.IsNotNull(rr);
// Assert.IsTrue(rr is TypeResolveResult);
// Assert.IsNull((rr as TypeResolveResult).ResolvedClass);
// Assert.IsTrue(rr.ResolvedType is GenericReturnType);
// }
//
// [Test]
// public void ClassTypeParameterResolveVariable()
// {
// ResolveResult rr = Resolve(genericClass, "var1", 5);
// Assert.IsNotNull(rr);
// Assert.IsTrue(rr is LocalResolveResult);
// Assert.IsTrue(rr.ResolvedType is GenericReturnType);
// }
//
// [Test]
// public void ClassTypeParameterResolveParameter()
// {
// ResolveResult rr = Resolve(genericClass, "par1", 5);
// Assert.IsNotNull(rr);
// Assert.IsTrue(rr is LocalResolveResult);
// Assert.IsTrue(rr.ResolvedType is GenericReturnType);
// }
//
// [Test]
// public void MethodTypeParameterResolveType()
// {
// ResolveResult rr = Resolve(genericClass, "G", 5);
// Assert.IsNotNull(rr);
// Assert.IsTrue(rr is TypeResolveResult);
// Assert.IsNull((rr as TypeResolveResult).ResolvedClass);
// Assert.IsTrue(rr.ResolvedType is GenericReturnType);
// }
//
// [Test]
// public void MethodTypeParameterResolveVariable()
// {
// ResolveResult rr = Resolve(genericClass, "var2", 5);
// Assert.IsNotNull(rr);
// Assert.IsTrue(rr is LocalResolveResult);
// Assert.IsTrue(rr.ResolvedType is GenericReturnType);
// }
//
// [Test]
// public void MethodTypeParameterResolveParameter()
// {
// ResolveResult rr = Resolve(genericClass, "par2", 5);
// Assert.IsNotNull(rr);
// Assert.IsTrue(rr is LocalResolveResult);
// Assert.IsTrue(rr.ResolvedType is GenericReturnType);
// }
// #endregion
}
}

8
src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj

@ -37,14 +37,14 @@ @@ -37,14 +37,14 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="nunit.framework">
<HintPath>..\..\..\Tools\NUnit\nunit.framework.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="ConsoleApp">
<HintPath>ConsoleApp\bin\ConsoleApp.exe</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\..\..\Tools\NUnit\nunit.framework.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />

208
src/Main/Base/Test/InnerClassesResolverTests.cs

@ -15,109 +15,109 @@ namespace ICSharpCode.SharpDevelop.Tests @@ -15,109 +15,109 @@ namespace ICSharpCode.SharpDevelop.Tests
[TestFixture]
public class InnerClassesResolverTests
{
#region Test helper methods
NRefactoryResolverTests nrrt = new NRefactoryResolverTests();
ResolveResult Resolve(string program, string expression, int line)
{
return nrrt.Resolve(program, expression, line);
}
ResolveResult ResolveVB(string program, string expression, int line)
{
return nrrt.ResolveVB(program, expression, line);
}
#endregion
[Test]
public void SimpleInnerClass()
{
string program = @"class A {
void Test() {
}
class B { }
}
";
ResolveResult result = Resolve(program, "B", 3);
Assert.IsTrue(result is TypeResolveResult);
Assert.AreEqual("A.B", result.ResolvedType.FullyQualifiedName);
}
[Test]
public void ReflectionInnerClass()
{
string program = @"using System;
class A {
void Test() {
}
}
";
ResolveResult result = Resolve(program, "Environment.SpecialFolder", 3);
Assert.IsTrue(result is TypeResolveResult);
Assert.AreEqual("System.Environment.SpecialFolder", result.ResolvedType.FullyQualifiedName);
}
[Test]
public void OuterclassPrivateFieldResolveTest()
{
string program = @"class A
{
int myField;
class B
{
void MyMethod(A a)
{
}
}
}
";
ResolveResult result = Resolve(program, "a", 8);
Assert.IsNotNull(result, "result");
Assert.IsTrue(result is LocalResolveResult, "result is LocalResolveResult");
ArrayList arr = result.GetCompletionData(nrrt.lastPC);
Assert.IsNotNull(arr, "arr");
foreach (object o in arr) {
if (o is IField) {
Assert.AreEqual("myField", ((IField)o).Name);
return;
}
}
Assert.Fail("private field not visible from inner class");
}
[Test]
public void InheritedInnerClass()
{
string program = @"class A {
class B { }
}
class C : A {
void Main() {
}
}
";
ResolveResult result = Resolve(program, "B", 6);
Assert.IsTrue(result is TypeResolveResult);
Assert.AreEqual("A.B", result.ResolvedType.FullyQualifiedName);
result = Resolve(program, "C.B", 6);
Assert.IsTrue(result is TypeResolveResult);
Assert.AreEqual("A.B", result.ResolvedType.FullyQualifiedName);
result = Resolve(program, "C", 6);
Assert.IsTrue(result is TypeResolveResult);
Assert.AreEqual("C", result.ResolvedType.FullyQualifiedName);
foreach (object o in result.GetCompletionData(nrrt.lastPC)) {
if (o is IClass) {
Assert.AreEqual("A.B", ((IClass)o).FullyQualifiedName);
return;
}
}
Assert.Fail("Inherited inner class not visible.");
}
// #region Test helper methods
// NRefactoryResolverTests nrrt = new NRefactoryResolverTests();
//
// ResolveResult Resolve(string program, string expression, int line)
// {
// return nrrt.Resolve(program, expression, line);
// }
//
// ResolveResult ResolveVB(string program, string expression, int line)
// {
// return nrrt.ResolveVB(program, expression, line);
// }
// #endregion
//
// [Test]
// public void SimpleInnerClass()
// {
// string program = @"class A {
// void Test() {
//
// }
// class B { }
//}
//";
// ResolveResult result = Resolve(program, "B", 3);
// Assert.IsTrue(result is TypeResolveResult);
// Assert.AreEqual("A.B", result.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void ReflectionInnerClass()
// {
// string program = @"using System;
//class A {
// void Test() {
//
// }
//}
//";
// ResolveResult result = Resolve(program, "Environment.SpecialFolder", 3);
// Assert.IsTrue(result is TypeResolveResult);
// Assert.AreEqual("System.Environment.SpecialFolder", result.ResolvedType.FullyQualifiedName);
// }
//
// [Test]
// public void OuterclassPrivateFieldResolveTest()
// {
// string program = @"class A
//{
// int myField;
// class B
// {
// void MyMethod(A a)
// {
//
// }
// }
//}
//";
// ResolveResult result = Resolve(program, "a", 8);
// Assert.IsNotNull(result, "result");
// Assert.IsTrue(result is LocalResolveResult, "result is LocalResolveResult");
// ArrayList arr = result.GetCompletionData(nrrt.lastPC);
// Assert.IsNotNull(arr, "arr");
// foreach (object o in arr) {
// if (o is IField) {
// Assert.AreEqual("myField", ((IField)o).Name);
// return;
// }
// }
// Assert.Fail("private field not visible from inner class");
// }
//
// [Test]
// public void InheritedInnerClass()
// {
// string program = @"class A {
// class B { }
//}
//class C : A {
// void Main() {
//
// }
//}
//";
// ResolveResult result = Resolve(program, "B", 6);
// Assert.IsTrue(result is TypeResolveResult);
// Assert.AreEqual("A.B", result.ResolvedType.FullyQualifiedName);
//
// result = Resolve(program, "C.B", 6);
// Assert.IsTrue(result is TypeResolveResult);
// Assert.AreEqual("A.B", result.ResolvedType.FullyQualifiedName);
//
// result = Resolve(program, "C", 6);
// Assert.IsTrue(result is TypeResolveResult);
// Assert.AreEqual("C", result.ResolvedType.FullyQualifiedName);
// foreach (object o in result.GetCompletionData(nrrt.lastPC)) {
// if (o is IClass) {
// Assert.AreEqual("A.B", ((IClass)o).FullyQualifiedName);
// return;
// }
// }
// Assert.Fail("Inherited inner class not visible.");
// }
}
}

88
src/Main/Base/Test/MemberLookupHelperTests.cs

@ -16,49 +16,49 @@ namespace ICSharpCode.SharpDevelop.Tests @@ -16,49 +16,49 @@ namespace ICSharpCode.SharpDevelop.Tests
[TestFixture]
public class MemberLookupHelperTests
{
IProjectContent msc = ProjectContentRegistry.Mscorlib;
IProjectContent swf = ProjectContentRegistry.GetProjectContentForReference("System.Windows.Forms", "System.Windows.Forms");
public IReturnType DictionaryRT {
get {
return new GetClassReturnType(msc, "System.Collections.Generic.Dictionary", 2);
}
}
public IClass EnumerableClass {
get {
return msc.GetClass("System.Collections.Generic.IEnumerable", 1);
}
}
[Test]
public void TypeParameterPassedToBaseClassTest()
{
IReturnType[] stringInt = { msc.SystemTypes.String, msc.SystemTypes.Int32 };
IReturnType rrt = new ConstructedReturnType(DictionaryRT, stringInt);
IReturnType res = MemberLookupHelper.GetTypeParameterPassedToBaseClass(rrt, EnumerableClass, 0);
Assert.AreEqual("System.Collections.Generic.KeyValuePair", res.FullyQualifiedName);
ConstructedReturnType resc = res.CastToConstructedReturnType();
Assert.AreEqual("System.String", resc.TypeArguments[0].FullyQualifiedName);
Assert.AreEqual("System.Int32", resc.TypeArguments[1].FullyQualifiedName);
}
[Test]
public void TypeParameterPassedToBaseClassSameClass()
{
IReturnType[] stringArr = { msc.SystemTypes.String };
IReturnType rrt = new ConstructedReturnType(EnumerableClass.DefaultReturnType, stringArr);
IReturnType res = MemberLookupHelper.GetTypeParameterPassedToBaseClass(rrt, EnumerableClass, 0);
Assert.AreEqual("System.String", res.FullyQualifiedName);
}
[Test]
public void GetCommonType()
{
IReturnType res = MemberLookupHelper.GetCommonType(msc,
swf.GetClass("System.Windows.Forms.ToolStripButton").DefaultReturnType,
swf.GetClass("System.Windows.Forms.ToolStripSeparator").DefaultReturnType);
Assert.AreEqual("System.Windows.Forms.ToolStripItem", res.FullyQualifiedName);
}
// IProjectContent msc = ProjectContentRegistry.Mscorlib;
// IProjectContent swf = ProjectContentRegistry.GetProjectContentForReference("System.Windows.Forms", "System.Windows.Forms");
//
// public IReturnType DictionaryRT {
// get {
// return new GetClassReturnType(msc, "System.Collections.Generic.Dictionary", 2);
// }
// }
//
// public IClass EnumerableClass {
// get {
// return msc.GetClass("System.Collections.Generic.IEnumerable", 1);
// }
// }
//
// [Test]
// public void TypeParameterPassedToBaseClassTest()
// {
// IReturnType[] stringInt = { msc.SystemTypes.String, msc.SystemTypes.Int32 };
// IReturnType rrt = new ConstructedReturnType(DictionaryRT, stringInt);
// IReturnType res = MemberLookupHelper.GetTypeParameterPassedToBaseClass(rrt, EnumerableClass, 0);
// Assert.AreEqual("System.Collections.Generic.KeyValuePair", res.FullyQualifiedName);
// ConstructedReturnType resc = res.CastToConstructedReturnType();
// Assert.AreEqual("System.String", resc.TypeArguments[0].FullyQualifiedName);
// Assert.AreEqual("System.Int32", resc.TypeArguments[1].FullyQualifiedName);
// }
//
// [Test]
// public void TypeParameterPassedToBaseClassSameClass()
// {
// IReturnType[] stringArr = { msc.SystemTypes.String };
// IReturnType rrt = new ConstructedReturnType(EnumerableClass.DefaultReturnType, stringArr);
// IReturnType res = MemberLookupHelper.GetTypeParameterPassedToBaseClass(rrt, EnumerableClass, 0);
// Assert.AreEqual("System.String", res.FullyQualifiedName);
// }
//
// [Test]
// public void GetCommonType()
// {
// IReturnType res = MemberLookupHelper.GetCommonType(msc,
// swf.GetClass("System.Windows.Forms.ToolStripButton").DefaultReturnType,
// swf.GetClass("System.Windows.Forms.ToolStripSeparator").DefaultReturnType);
// Assert.AreEqual("System.Windows.Forms.ToolStripItem", res.FullyQualifiedName);
// }
}
}

1846
src/Main/Base/Test/NRefactoryResolverTests.cs

File diff suppressed because it is too large Load Diff

124
src/Main/Base/Test/OverloadFinding.cs

@ -15,67 +15,67 @@ namespace ICSharpCode.SharpDevelop.Tests @@ -15,67 +15,67 @@ namespace ICSharpCode.SharpDevelop.Tests
[TestFixture]
public class OverloadFinding
{
[Test] public void Simple()
{
Test("(\"Hallo\")", 0, "(string a)", "(int b)");
Test("(2)", 1, "(string a)", "(int b)");
}
[Test] public void WinForms()
{
string[] overloads = {"(object a)", "(TextBoxBase a)", "(Control a)", "(RichTextBox a)"};
Test("(new RichTextBox())", 3, overloads);
Test("(new Control())", 2, overloads);
Test("(new TextBox())", 1, overloads);
Test("(new Button())", 2, overloads);
Test("(3)", 0, overloads);
}
[Test] public void Params()
{
string[] overloads = {"(params int[] a)", "(int a, params int[] b)"};
Test("()", 0, overloads);
Test("(1)", 1, overloads);
Test("(1, 2)", 1, overloads);
}
[Test] public void IntegerConversion()
{
string[] overloads = {"<T>(T a)", "(int a)"};
Test("(1)", 1, overloads);
Test("(short.MaxValue)", 1, overloads);
Test("(long.MaxValue)", 0, overloads);
}
NRefactoryResolverTests nrrt = new NRefactoryResolverTests();
void Test(string callExpr, int num, params string[] signatures)
{
StringBuilder b = new StringBuilder();
int lineNumber = 0;
++lineNumber; b.AppendLine("using System;");
++lineNumber; b.AppendLine("using System.Windows.Forms;");
++lineNumber; b.AppendLine("class TestClass {");
++lineNumber; b.AppendLine(" void callingMethod() {");
++lineNumber; b.AppendLine(" ");
int callPosition = lineNumber;
++lineNumber; b.AppendLine(" }");
int[] positions = new int[signatures.Length];
for (int i = 0; i < signatures.Length; i++) {
b.Append(" void Method");
b.Append(signatures[i]);
++lineNumber; b.AppendLine(" {");
positions[i] = lineNumber;
++lineNumber; b.AppendLine(" }");
}
b.AppendLine("}");
MemberResolveResult mrr = nrrt.Resolve<MemberResolveResult>(b.ToString(), "Method" + callExpr, callPosition);
string msg = "wrong overload: ";
for (int i = 0; i < positions.Length; i++) {
if (positions[i] == mrr.ResolvedMember.Region.BeginLine)
msg += signatures[i];
}
Assert.AreEqual(positions[num], mrr.ResolvedMember.Region.BeginLine, msg);
}
// [Test] public void Simple()
// {
// Test("(\"Hallo\")", 0, "(string a)", "(int b)");
// Test("(2)", 1, "(string a)", "(int b)");
// }
//
// [Test] public void WinForms()
// {
// string[] overloads = {"(object a)", "(TextBoxBase a)", "(Control a)", "(RichTextBox a)"};
// Test("(new RichTextBox())", 3, overloads);
// Test("(new Control())", 2, overloads);
// Test("(new TextBox())", 1, overloads);
// Test("(new Button())", 2, overloads);
// Test("(3)", 0, overloads);
// }
//
// [Test] public void Params()
// {
// string[] overloads = {"(params int[] a)", "(int a, params int[] b)"};
// Test("()", 0, overloads);
// Test("(1)", 1, overloads);
// Test("(1, 2)", 1, overloads);
// }
//
// [Test] public void IntegerConversion()
// {
// string[] overloads = {"<T>(T a)", "(int a)"};
// Test("(1)", 1, overloads);
// Test("(short.MaxValue)", 1, overloads);
// Test("(long.MaxValue)", 0, overloads);
// }
//
// NRefactoryResolverTests nrrt = new NRefactoryResolverTests();
//
// void Test(string callExpr, int num, params string[] signatures)
// {
// StringBuilder b = new StringBuilder();
// int lineNumber = 0;
// ++lineNumber; b.AppendLine("using System;");
// ++lineNumber; b.AppendLine("using System.Windows.Forms;");
// ++lineNumber; b.AppendLine("class TestClass {");
// ++lineNumber; b.AppendLine(" void callingMethod() {");
// ++lineNumber; b.AppendLine(" ");
// int callPosition = lineNumber;
// ++lineNumber; b.AppendLine(" }");
// int[] positions = new int[signatures.Length];
// for (int i = 0; i < signatures.Length; i++) {
// b.Append(" void Method");
// b.Append(signatures[i]);
// ++lineNumber; b.AppendLine(" {");
// positions[i] = lineNumber;
// ++lineNumber; b.AppendLine(" }");
// }
// b.AppendLine("}");
// MemberResolveResult mrr = nrrt.Resolve<MemberResolveResult>(b.ToString(), "Method" + callExpr, callPosition);
// string msg = "wrong overload: ";
// for (int i = 0; i < positions.Length; i++) {
// if (positions[i] == mrr.ResolvedMember.Region.BeginLine)
// msg += signatures[i];
// }
// Assert.AreEqual(positions[num], mrr.ResolvedMember.Region.BeginLine, msg);
// }
}
}

274
src/Main/Base/Test/ReflectionLayerTests.cs

@ -20,142 +20,142 @@ namespace ICSharpCode.SharpDevelop.Tests @@ -20,142 +20,142 @@ namespace ICSharpCode.SharpDevelop.Tests
[TestFixture]
public class ReflectionLayerTests
{
IProjectContent pc = ProjectContentRegistry.Mscorlib;
[Test]
public void InheritanceTest()
{
IClass c = pc.GetClass("System.SystemException");
IClass c2 = pc.GetClass("System.Exception");
Assert.IsNotNull(c, "c is null");
Assert.IsNotNull(c2, "c2 is null");
Assert.AreEqual(3, c.BaseTypes.Count); // 2 interfaces
Assert.AreEqual("System.Exception", c.BaseTypes[0].FullyQualifiedName);
Assert.AreSame(c2, c.BaseClass);
List<IClass> subClasses = new List<IClass>();
foreach (IClass subClass in c.ClassInheritanceTree) {
subClasses.Add(subClass);
}
Assert.AreEqual(5, subClasses.Count, "ClassInheritanceTree length");
Assert.AreEqual("System.SystemException", subClasses[0].FullyQualifiedName);
Assert.AreEqual("System.Exception", subClasses[1].FullyQualifiedName);
Assert.AreEqual("System.Runtime.Serialization.ISerializable", subClasses[2].FullyQualifiedName);
Assert.AreEqual("System.Runtime.InteropServices._Exception", subClasses[3].FullyQualifiedName);
Assert.AreEqual("System.Object", subClasses[4].FullyQualifiedName);
}
[Test]
public void ParameterComparisonTest()
{
DefaultParameter p1 = new DefaultParameter("a", pc.GetClass("System.String").DefaultReturnType, DomRegion.Empty);
DefaultParameter p2 = new DefaultParameter("b", new GetClassReturnType(pc, "System.String", 0), DomRegion.Empty);
IList<IParameter> a1 = new List<IParameter>();
IList<IParameter> a2 = new List<IParameter>();
a1.Add(p1);
a2.Add(p2);
Assert.AreEqual(0, DiffUtility.Compare(a1, a2));
}
DefaultMethod GetMethod(IClass c, string name) {
IMethod result = c.Methods.Find(delegate(IMethod m) { return m.Name == name; });
Assert.IsNotNull(result, "Method " + name + " not found");
return (DefaultMethod)result;
}
[Test]
public void GenericDocumentationTagNamesTest()
{
DefaultClass c = (DefaultClass)pc.GetClass("System.Collections.Generic.List");
Assert.AreEqual("T:System.Collections.Generic.List`1",
c.DocumentationTag);
Assert.AreEqual("M:System.Collections.Generic.List`1.Add(`0)",
GetMethod(c, "Add").DocumentationTag);
Assert.AreEqual("M:System.Collections.Generic.List`1.AddRange(System.Collections.Generic.IEnumerable{`0})",
GetMethod(c, "AddRange").DocumentationTag);
Assert.AreEqual("M:System.Collections.Generic.List`1.ConvertAll``1(System.Converter{`0,``0})",
GetMethod(c, "ConvertAll").DocumentationTag);
}
[Test]
public void InnerClassReferenceTest()
{
IClass c = pc.GetClass("System.Environment");
Assert.IsNotNull(c, "System.Environment not found");
IReturnType rt = GetMethod(c, "GetFolderPath").Parameters[0].ReturnType;
Assert.IsNotNull(rt, "ReturnType is null");
Assert.AreEqual("System.Environment.SpecialFolder", rt.FullyQualifiedName);
IClass inner = rt.GetUnderlyingClass();
Assert.IsNotNull(inner, "UnderlyingClass");
Assert.AreEqual("System.Environment.SpecialFolder", inner.FullyQualifiedName);
}
[Test]
public void InnerClassesTest()
{
IClass c = pc.GetClass("System.Environment.SpecialFolder");
Assert.IsNotNull(c, "c is null");
Assert.AreEqual("System.Environment.SpecialFolder", c.FullyQualifiedName);
}
[Test]
public void VoidTest()
{
IClass c = pc.GetClass("System.Void");
Assert.IsNotNull(c, "System.Void not found");
Assert.AreSame(c.DefaultReturnType, VoidReturnType.Instance, "VoidReturnType.Instance is c.DefaultReturnType");
}
class TestClass<A, B> where A : B {
public void TestMethod<K, V>(string param) where V: K where K: IComparable {}
public void GetIndex<T>(T element) where T: IEquatable<T> {}
}
[Test]
public void ReflectionParserTest()
{
ICompilationUnit cu = new ReflectionProjectContent("TestName", "testlocation", new AssemblyName[0]).AssemblyCompilationUnit;
IClass c = new ReflectionClass(cu, typeof(TestClass<,>), typeof(TestClass<,>).FullName, null);
cu.ProjectContent.AddClassToNamespaceList(c);
CheckClass(c);
MemoryStream memory = new MemoryStream();
DomPersistence.WriteProjectContent((ReflectionProjectContent)cu.ProjectContent, memory);
memory.Position = 0;
foreach (IClass c2 in DomPersistence.LoadProjectContent(memory).Classes) {
CheckClass(c2);
}
}
void CheckClass(IClass c)
{
Assert.AreSame(c, c.TypeParameters[0].Class);
Assert.AreSame(c, c.TypeParameters[1].Class);
Assert.AreSame(c.TypeParameters[1], ((GenericReturnType)c.TypeParameters[0].Constraints[0]).TypeParameter);
IMethod m = c.Methods.Find(delegate(IMethod me) { return me.Name == "TestMethod"; });
Assert.IsNotNull(m);
Assert.AreEqual("K", m.TypeParameters[0].Name);
Assert.AreEqual("V", m.TypeParameters[1].Name);
Assert.AreSame(m, m.TypeParameters[0].Method);
Assert.AreSame(m, m.TypeParameters[1].Method);
Assert.AreEqual("IComparable", m.TypeParameters[0].Constraints[0].Name);
GenericReturnType kConst = (GenericReturnType)m.TypeParameters[1].Constraints[0];
Assert.AreSame(m.TypeParameters[0], kConst.TypeParameter);
m = c.Methods.Find(delegate(IMethod me) { return me.Name == "GetIndex"; });
Assert.IsNotNull(m);
Assert.AreEqual("T", m.TypeParameters[0].Name);
Assert.AreSame(m, m.TypeParameters[0].Method);
Assert.AreEqual("IEquatable", m.TypeParameters[0].Constraints[0].Name);
Assert.AreEqual(1, m.TypeParameters[0].Constraints[0].TypeParameterCount);
Assert.AreEqual(1, m.TypeParameters[0].Constraints[0].CastToConstructedReturnType().TypeArguments.Count);
GenericReturnType grt = (GenericReturnType)m.TypeParameters[0].Constraints[0].CastToConstructedReturnType().TypeArguments[0];
Assert.AreSame(m.TypeParameters[0], grt.TypeParameter);
}
// IProjectContent pc = ProjectContentRegistry.Mscorlib;
//
// [Test]
// public void InheritanceTest()
// {
// IClass c = pc.GetClass("System.SystemException");
// IClass c2 = pc.GetClass("System.Exception");
// Assert.IsNotNull(c, "c is null");
// Assert.IsNotNull(c2, "c2 is null");
// Assert.AreEqual(3, c.BaseTypes.Count); // 2 interfaces
// Assert.AreEqual("System.Exception", c.BaseTypes[0].FullyQualifiedName);
// Assert.AreSame(c2, c.BaseClass);
//
// List<IClass> subClasses = new List<IClass>();
// foreach (IClass subClass in c.ClassInheritanceTree) {
// subClasses.Add(subClass);
// }
// Assert.AreEqual(5, subClasses.Count, "ClassInheritanceTree length");
// Assert.AreEqual("System.SystemException", subClasses[0].FullyQualifiedName);
// Assert.AreEqual("System.Exception", subClasses[1].FullyQualifiedName);
// Assert.AreEqual("System.Runtime.Serialization.ISerializable", subClasses[2].FullyQualifiedName);
// Assert.AreEqual("System.Runtime.InteropServices._Exception", subClasses[3].FullyQualifiedName);
// Assert.AreEqual("System.Object", subClasses[4].FullyQualifiedName);
// }
//
// [Test]
// public void ParameterComparisonTest()
// {
// DefaultParameter p1 = new DefaultParameter("a", pc.GetClass("System.String").DefaultReturnType, DomRegion.Empty);
// DefaultParameter p2 = new DefaultParameter("b", new GetClassReturnType(pc, "System.String", 0), DomRegion.Empty);
// IList<IParameter> a1 = new List<IParameter>();
// IList<IParameter> a2 = new List<IParameter>();
// a1.Add(p1);
// a2.Add(p2);
// Assert.AreEqual(0, DiffUtility.Compare(a1, a2));
// }
//
// DefaultMethod GetMethod(IClass c, string name) {
// IMethod result = c.Methods.Find(delegate(IMethod m) { return m.Name == name; });
// Assert.IsNotNull(result, "Method " + name + " not found");
// return (DefaultMethod)result;
// }
//
// [Test]
// public void GenericDocumentationTagNamesTest()
// {
// DefaultClass c = (DefaultClass)pc.GetClass("System.Collections.Generic.List");
// Assert.AreEqual("T:System.Collections.Generic.List`1",
// c.DocumentationTag);
// Assert.AreEqual("M:System.Collections.Generic.List`1.Add(`0)",
// GetMethod(c, "Add").DocumentationTag);
// Assert.AreEqual("M:System.Collections.Generic.List`1.AddRange(System.Collections.Generic.IEnumerable{`0})",
// GetMethod(c, "AddRange").DocumentationTag);
// Assert.AreEqual("M:System.Collections.Generic.List`1.ConvertAll``1(System.Converter{`0,``0})",
// GetMethod(c, "ConvertAll").DocumentationTag);
// }
//
// [Test]
// public void InnerClassReferenceTest()
// {
// IClass c = pc.GetClass("System.Environment");
// Assert.IsNotNull(c, "System.Environment not found");
// IReturnType rt = GetMethod(c, "GetFolderPath").Parameters[0].ReturnType;
// Assert.IsNotNull(rt, "ReturnType is null");
// Assert.AreEqual("System.Environment.SpecialFolder", rt.FullyQualifiedName);
// IClass inner = rt.GetUnderlyingClass();
// Assert.IsNotNull(inner, "UnderlyingClass");
// Assert.AreEqual("System.Environment.SpecialFolder", inner.FullyQualifiedName);
// }
//
// [Test]
// public void InnerClassesTest()
// {
// IClass c = pc.GetClass("System.Environment.SpecialFolder");
// Assert.IsNotNull(c, "c is null");
// Assert.AreEqual("System.Environment.SpecialFolder", c.FullyQualifiedName);
// }
//
// [Test]
// public void VoidTest()
// {
// IClass c = pc.GetClass("System.Void");
// Assert.IsNotNull(c, "System.Void not found");
// Assert.AreSame(c.DefaultReturnType, VoidReturnType.Instance, "VoidReturnType.Instance is c.DefaultReturnType");
// }
//
// class TestClass<A, B> where A : B {
// public void TestMethod<K, V>(string param) where V: K where K: IComparable {}
//
// public void GetIndex<T>(T element) where T: IEquatable<T> {}
// }
//
// [Test]
// public void ReflectionParserTest()
// {
// ICompilationUnit cu = new ReflectionProjectContent("TestName", "testlocation", new AssemblyName[0]).AssemblyCompilationUnit;
// IClass c = new ReflectionClass(cu, typeof(TestClass<,>), typeof(TestClass<,>).FullName, null);
// cu.ProjectContent.AddClassToNamespaceList(c);
//
// CheckClass(c);
// MemoryStream memory = new MemoryStream();
// DomPersistence.WriteProjectContent((ReflectionProjectContent)cu.ProjectContent, memory);
//
// memory.Position = 0;
// foreach (IClass c2 in DomPersistence.LoadProjectContent(memory).Classes) {
// CheckClass(c2);
// }
// }
//
// void CheckClass(IClass c)
// {
// Assert.AreSame(c, c.TypeParameters[0].Class);
// Assert.AreSame(c, c.TypeParameters[1].Class);
// Assert.AreSame(c.TypeParameters[1], ((GenericReturnType)c.TypeParameters[0].Constraints[0]).TypeParameter);
//
// IMethod m = c.Methods.Find(delegate(IMethod me) { return me.Name == "TestMethod"; });
// Assert.IsNotNull(m);
// Assert.AreEqual("K", m.TypeParameters[0].Name);
// Assert.AreEqual("V", m.TypeParameters[1].Name);
// Assert.AreSame(m, m.TypeParameters[0].Method);
// Assert.AreSame(m, m.TypeParameters[1].Method);
//
// Assert.AreEqual("IComparable", m.TypeParameters[0].Constraints[0].Name);
// GenericReturnType kConst = (GenericReturnType)m.TypeParameters[1].Constraints[0];
// Assert.AreSame(m.TypeParameters[0], kConst.TypeParameter);
//
// m = c.Methods.Find(delegate(IMethod me) { return me.Name == "GetIndex"; });
// Assert.IsNotNull(m);
// Assert.AreEqual("T", m.TypeParameters[0].Name);
// Assert.AreSame(m, m.TypeParameters[0].Method);
//
// Assert.AreEqual("IEquatable", m.TypeParameters[0].Constraints[0].Name);
// Assert.AreEqual(1, m.TypeParameters[0].Constraints[0].TypeParameterCount);
// Assert.AreEqual(1, m.TypeParameters[0].Constraints[0].CastToConstructedReturnType().TypeArguments.Count);
// GenericReturnType grt = (GenericReturnType)m.TypeParameters[0].Constraints[0].CastToConstructedReturnType().TypeArguments[0];
// Assert.AreSame(m.TypeParameters[0], grt.TypeParameter);
// }
}
}

246
src/Main/Base/Test/SearchClassTests.cs

@ -15,128 +15,128 @@ namespace ICSharpCode.SharpDevelop.Tests @@ -15,128 +15,128 @@ namespace ICSharpCode.SharpDevelop.Tests
[TestFixture]
public class SearchClassTests
{
#region Helper methods
ICompilationUnit Prepare(LanguageProperties language)
{
DefaultProjectContent pc = new DefaultProjectContent();
pc.ReferencedContents.Add(ProjectContentRegistry.Mscorlib);
pc.Language = language;
DefaultCompilationUnit cu = new DefaultCompilationUnit(pc);
if (language == LanguageProperties.VBNet)
cu.Usings.Add(CreateUsing(pc, "syStEm"));
else
cu.Usings.Add(CreateUsing(pc, "System"));
return cu;
}
IUsing CreateUsing(IProjectContent pc, string @namespace)
{
DefaultUsing @using = new DefaultUsing(pc);
@using.Usings.Add(@namespace);
return @using;
}
IReturnType SearchType(string type)
{
ICompilationUnit cu = Prepare(LanguageProperties.CSharp);
IReturnType c = cu.ProjectContent.SearchType(new SearchTypeRequest(type, 0, null, cu, 1, 1)).Result;
Assert.IsNotNull(c, type + "not found");
return c;
}
IReturnType SearchTypeVB(string type)
{
ICompilationUnit cu = Prepare(LanguageProperties.VBNet);
IReturnType c = cu.ProjectContent.SearchType(new SearchTypeRequest(type, 0, null, cu, 1, 1)).Result;
Assert.IsNotNull(c, type + "not found");
return c;
}
void CheckNamespace(string @namespace, string className)
{
CheckNamespace(@namespace, className, LanguageProperties.CSharp);
}
void CheckNamespaceVB(string @namespace, string className)
{
CheckNamespace(@namespace, className, LanguageProperties.VBNet);
}
void CheckNamespace(string @namespace, string className, LanguageProperties language)
{
ICompilationUnit cu = Prepare(language);
string ns = cu.ProjectContent.SearchNamespace(@namespace, null, cu, 1, 1);
Assert.IsNotNull(ns, @namespace + " not found");
foreach (object o in cu.ProjectContent.GetNamespaceContents(ns)) {
IClass c = o as IClass;
if (c != null && c.Name == className)
return;
}
}
#endregion
[Test]
public void SearchFullyQualifiedClass()
{
Assert.AreEqual("System.Reflection.Assembly", SearchType("System.Reflection.Assembly").FullyQualifiedName);
}
[Test]
public void SearchFullyQualifiedClassVB()
{
Assert.AreEqual("System.Reflection.Assembly", SearchTypeVB("SYStem.RefleCtion.asSembly").FullyQualifiedName);
}
[Test]
public void SearchFullyQualifiedNamespace()
{
CheckNamespace("System.Collections.Generic", "KeyNotFoundException");
}
[Test]
public void SearchFullyQualifiedNamespaceVB()
{
CheckNamespaceVB("SyStem.COllEctions.GeNEric", "KeyNotFoundException");
}
[Test]
public void SearchEnvironment()
{
Assert.AreEqual("System.Environment", SearchType("Environment").FullyQualifiedName);
}
[Test]
public void SearchEnvironmentVB()
{
Assert.AreEqual("System.Environment", SearchTypeVB("EnVIroNmEnt").FullyQualifiedName);
}
[Test]
public void SearchArrayList()
{
ICompilationUnit cu = Prepare(LanguageProperties.CSharp);
IReturnType c = cu.ProjectContent.SearchType(new SearchTypeRequest("Collections.ArrayList", 0, null, cu, 1, 1)).Result;
Assert.IsNull(c, "Namespaces should not be imported in C#");
}
[Test]
public void SearchArrayListVB()
{
Assert.AreEqual("System.Collections.ArrayList", SearchTypeVB("CoLLections.ArrAyLiSt").FullyQualifiedName);
}
[Test]
public void SearchNestedNamespace()
{
ICompilationUnit cu = Prepare(LanguageProperties.CSharp);
string ns = cu.ProjectContent.SearchNamespace("Collections.Generic", null, cu, 1, 1);
Assert.IsNull(ns, "Nested namespaces should not be found in C#");
}
[Test]
public void SearchNestedNamespaceVB()
{
CheckNamespaceVB("COllEctions.GeNEric", "KeyNotFoundException");
}
// #region Helper methods
// ICompilationUnit Prepare(LanguageProperties language)
// {
// DefaultProjectContent pc = new DefaultProjectContent();
// pc.ReferencedContents.Add(ProjectContentRegistry.Mscorlib);
// pc.Language = language;
// DefaultCompilationUnit cu = new DefaultCompilationUnit(pc);
// if (language == LanguageProperties.VBNet)
// cu.Usings.Add(CreateUsing(pc, "syStEm"));
// else
// cu.Usings.Add(CreateUsing(pc, "System"));
// return cu;
// }
//
// IUsing CreateUsing(IProjectContent pc, string @namespace)
// {
// DefaultUsing @using = new DefaultUsing(pc);
// @using.Usings.Add(@namespace);
// return @using;
// }
//
// IReturnType SearchType(string type)
// {
// ICompilationUnit cu = Prepare(LanguageProperties.CSharp);
// IReturnType c = cu.ProjectContent.SearchType(new SearchTypeRequest(type, 0, null, cu, 1, 1)).Result;
// Assert.IsNotNull(c, type + "not found");
// return c;
// }
//
// IReturnType SearchTypeVB(string type)
// {
// ICompilationUnit cu = Prepare(LanguageProperties.VBNet);
// IReturnType c = cu.ProjectContent.SearchType(new SearchTypeRequest(type, 0, null, cu, 1, 1)).Result;
// Assert.IsNotNull(c, type + "not found");
// return c;
// }
//
// void CheckNamespace(string @namespace, string className)
// {
// CheckNamespace(@namespace, className, LanguageProperties.CSharp);
// }
//
// void CheckNamespaceVB(string @namespace, string className)
// {
// CheckNamespace(@namespace, className, LanguageProperties.VBNet);
// }
//
// void CheckNamespace(string @namespace, string className, LanguageProperties language)
// {
// ICompilationUnit cu = Prepare(language);
// string ns = cu.ProjectContent.SearchNamespace(@namespace, null, cu, 1, 1);
// Assert.IsNotNull(ns, @namespace + " not found");
// foreach (object o in cu.ProjectContent.GetNamespaceContents(ns)) {
// IClass c = o as IClass;
// if (c != null && c.Name == className)
// return;
// }
// }
// #endregion
//
// [Test]
// public void SearchFullyQualifiedClass()
// {
// Assert.AreEqual("System.Reflection.Assembly", SearchType("System.Reflection.Assembly").FullyQualifiedName);
// }
//
// [Test]
// public void SearchFullyQualifiedClassVB()
// {
// Assert.AreEqual("System.Reflection.Assembly", SearchTypeVB("SYStem.RefleCtion.asSembly").FullyQualifiedName);
// }
//
// [Test]
// public void SearchFullyQualifiedNamespace()
// {
// CheckNamespace("System.Collections.Generic", "KeyNotFoundException");
// }
//
// [Test]
// public void SearchFullyQualifiedNamespaceVB()
// {
// CheckNamespaceVB("SyStem.COllEctions.GeNEric", "KeyNotFoundException");
// }
//
// [Test]
// public void SearchEnvironment()
// {
// Assert.AreEqual("System.Environment", SearchType("Environment").FullyQualifiedName);
// }
//
// [Test]
// public void SearchEnvironmentVB()
// {
// Assert.AreEqual("System.Environment", SearchTypeVB("EnVIroNmEnt").FullyQualifiedName);
// }
//
// [Test]
// public void SearchArrayList()
// {
// ICompilationUnit cu = Prepare(LanguageProperties.CSharp);
// IReturnType c = cu.ProjectContent.SearchType(new SearchTypeRequest("Collections.ArrayList", 0, null, cu, 1, 1)).Result;
// Assert.IsNull(c, "Namespaces should not be imported in C#");
// }
//
// [Test]
// public void SearchArrayListVB()
// {
// Assert.AreEqual("System.Collections.ArrayList", SearchTypeVB("CoLLections.ArrAyLiSt").FullyQualifiedName);
// }
//
// [Test]
// public void SearchNestedNamespace()
// {
// ICompilationUnit cu = Prepare(LanguageProperties.CSharp);
// string ns = cu.ProjectContent.SearchNamespace("Collections.Generic", null, cu, 1, 1);
// Assert.IsNull(ns, "Nested namespaces should not be found in C#");
// }
//
// [Test]
// public void SearchNestedNamespaceVB()
// {
// CheckNamespaceVB("COllEctions.GeNEric", "KeyNotFoundException");
// }
}
}

158
src/Main/Base/Test/SearchGenericClassTests.cs

@ -16,84 +16,84 @@ namespace ICSharpCode.SharpDevelop.Tests @@ -16,84 +16,84 @@ namespace ICSharpCode.SharpDevelop.Tests
[TestFixture]
public class SearchGenericClassTests
{
#region Helper methods
ICompilationUnit Prepare(LanguageProperties language)
{
DefaultProjectContent pc = new DefaultProjectContent();
pc.ReferencedContents.Add(ProjectContentRegistry.Mscorlib);
pc.Language = language;
DefaultCompilationUnit cu = new DefaultCompilationUnit(pc);
if (language == LanguageProperties.VBNet) {
cu.Usings.Add(CreateUsing(pc, "syStEm.coLLectIons"));
pc.DefaultImports = new DefaultUsing(pc);
pc.DefaultImports.Usings.Add("syStEm");
pc.DefaultImports.Usings.Add("syStEm.coLLEctionS.GeNeRic");
} else {
cu.Usings.Add(CreateUsing(pc, "System"));
cu.Usings.Add(CreateUsing(pc, "System.Collections"));
cu.Usings.Add(CreateUsing(pc, "System.Collections.Generic"));
}
return cu;
}
IUsing CreateUsing(IProjectContent pc, string @namespace)
{
DefaultUsing @using = new DefaultUsing(pc);
@using.Usings.Add(@namespace);
return @using;
}
IReturnType SearchType(string type, int typeParameterCount)
{
ICompilationUnit cu = Prepare(LanguageProperties.CSharp);
IReturnType c = cu.ProjectContent.SearchType(new SearchTypeRequest(type, typeParameterCount, null, cu, 1, 1)).Result;
Assert.IsNotNull(c, type + "not found");
return c;
}
IReturnType SearchTypeVB(string type, int typeParameterCount)
{
ICompilationUnit cu = Prepare(LanguageProperties.VBNet);
IReturnType c = cu.ProjectContent.SearchType(new SearchTypeRequest(type, typeParameterCount, null, cu, 1, 1)).Result;
Assert.IsNotNull(c, type + "not found");
return c;
}
void CheckType(string shortName, string vbShortName, string fullType, int typeParameterCount)
{
IReturnType type = SearchType(shortName, typeParameterCount);
Assert.AreEqual(fullType, type.FullyQualifiedName);
Assert.AreEqual(typeParameterCount, type.TypeParameterCount);
type = SearchTypeVB(vbShortName, typeParameterCount);
Assert.AreEqual(fullType, type.FullyQualifiedName);
Assert.AreEqual(typeParameterCount, type.TypeParameterCount);
}
#endregion
// EventHandler vs. EventHandler<TEventArgs>
// both mscorlib, both namespace System
[Test] public void FindEventHandler() {
CheckType("EventHandler", "EvEnThAndler", "System.EventHandler", 0);
}
[Test] public void FindGenericEventHandler() {
CheckType("EventHandler", "EvEnThAndler", "System.EventHandler", 1);
}
[Test] public void FindNullableClass() {
CheckType("Nullable", "NuLLable", "System.Nullable", 0);
}
[Test] public void FindNullableStruct() {
CheckType("Nullable", "NuLLable", "System.Nullable", 1);
}
// ICollection vs. ICollection<T>
// both mscorlib, different namespaces
[Test] public void FindCollection() {
CheckType("ICollection", "IColLEction", "System.Collections.ICollection", 0);
}
[Test] public void FindGenericCollection() {
CheckType("ICollection", "IColLEction", "System.Collections.Generic.ICollection", 1);
}
// #region Helper methods
// ICompilationUnit Prepare(LanguageProperties language)
// {
// DefaultProjectContent pc = new DefaultProjectContent();
// pc.ReferencedContents.Add(ProjectContentRegistry.Mscorlib);
// pc.Language = language;
// DefaultCompilationUnit cu = new DefaultCompilationUnit(pc);
// if (language == LanguageProperties.VBNet) {
// cu.Usings.Add(CreateUsing(pc, "syStEm.coLLectIons"));
// pc.DefaultImports = new DefaultUsing(pc);
// pc.DefaultImports.Usings.Add("syStEm");
// pc.DefaultImports.Usings.Add("syStEm.coLLEctionS.GeNeRic");
// } else {
// cu.Usings.Add(CreateUsing(pc, "System"));
// cu.Usings.Add(CreateUsing(pc, "System.Collections"));
// cu.Usings.Add(CreateUsing(pc, "System.Collections.Generic"));
// }
// return cu;
// }
//
// IUsing CreateUsing(IProjectContent pc, string @namespace)
// {
// DefaultUsing @using = new DefaultUsing(pc);
// @using.Usings.Add(@namespace);
// return @using;
// }
//
// IReturnType SearchType(string type, int typeParameterCount)
// {
// ICompilationUnit cu = Prepare(LanguageProperties.CSharp);
// IReturnType c = cu.ProjectContent.SearchType(new SearchTypeRequest(type, typeParameterCount, null, cu, 1, 1)).Result;
// Assert.IsNotNull(c, type + "not found");
// return c;
// }
//
// IReturnType SearchTypeVB(string type, int typeParameterCount)
// {
// ICompilationUnit cu = Prepare(LanguageProperties.VBNet);
// IReturnType c = cu.ProjectContent.SearchType(new SearchTypeRequest(type, typeParameterCount, null, cu, 1, 1)).Result;
// Assert.IsNotNull(c, type + "not found");
// return c;
// }
//
// void CheckType(string shortName, string vbShortName, string fullType, int typeParameterCount)
// {
// IReturnType type = SearchType(shortName, typeParameterCount);
// Assert.AreEqual(fullType, type.FullyQualifiedName);
// Assert.AreEqual(typeParameterCount, type.TypeParameterCount);
// type = SearchTypeVB(vbShortName, typeParameterCount);
// Assert.AreEqual(fullType, type.FullyQualifiedName);
// Assert.AreEqual(typeParameterCount, type.TypeParameterCount);
// }
// #endregion
//
// // EventHandler vs. EventHandler<TEventArgs>
// // both mscorlib, both namespace System
// [Test] public void FindEventHandler() {
// CheckType("EventHandler", "EvEnThAndler", "System.EventHandler", 0);
// }
// [Test] public void FindGenericEventHandler() {
// CheckType("EventHandler", "EvEnThAndler", "System.EventHandler", 1);
// }
//
//
// [Test] public void FindNullableClass() {
// CheckType("Nullable", "NuLLable", "System.Nullable", 0);
// }
// [Test] public void FindNullableStruct() {
// CheckType("Nullable", "NuLLable", "System.Nullable", 1);
// }
//
// // ICollection vs. ICollection<T>
// // both mscorlib, different namespaces
// [Test] public void FindCollection() {
// CheckType("ICollection", "IColLEction", "System.Collections.ICollection", 0);
// }
// [Test] public void FindGenericCollection() {
// CheckType("ICollection", "IColLEction", "System.Collections.Generic.ICollection", 1);
// }
}
}

2
src/Main/ICSharpCode.SharpDevelop.Dom/Project/ICSharpCode.SharpDevelop.Dom.csproj

@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

4
src/Main/ICSharpCode.SharpDevelop.Sda/ICSharpCode.SharpDevelop.Sda.csproj

@ -22,13 +22,13 @@ @@ -22,13 +22,13 @@
<AssemblyOriginatorKeyFile>..\ICSharpCode.SharpDevelop.snk</AssemblyOriginatorKeyFile>
<DelaySign>False</DelaySign>
<AssemblyOriginatorKeyMode>File</AssemblyOriginatorKeyMode>
<CodeAnalysisRules>-Microsoft.Naming#CA1704%3b-Microsoft.Performance#CA1822</CodeAnalysisRules>
<CodeAnalysisRules>-Microsoft.Naming#CA1704;-Microsoft.Performance#CA1822</CodeAnalysisRules>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

1
src/Main/StartUp/Project/app.template.config

@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
<assemblyIdentity name="ICSharpCode.NRefactory" publicKeyToken="efe927acf176eea2" culture="neutral"/>
<bindingRedirect oldVersion="2.1.0.1661-$INSERTVERSION$" newVersion="$INSERTVERSION$"/>
</dependentAssembly>
<probing privatePath="Tools\NUnit"/>
</assemblyBinding>
</runtime>
<log4net>

Loading…
Cancel
Save