From b4909233cf1cf1edf6577ab23705e77b549ea072 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Wed, 3 Sep 2008 17:59:32 +0000 Subject: [PATCH] Added unit test for VBNetToCSharpConvertVisitor.FullyQualifyModuleMemberReference. Remove IronMath reference in PythonBinding test project. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3474 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Test/Python.Build.Tasks.Tests.csproj | 4 --- src/Main/Base/Test/CodeConverterTests.cs | 30 +++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/AddIns/BackendBindings/Python/Python.Build.Tasks/Test/Python.Build.Tasks.Tests.csproj b/src/AddIns/BackendBindings/Python/Python.Build.Tasks/Test/Python.Build.Tasks.Tests.csproj index 870a9db591..bfb1e69fe9 100644 --- a/src/AddIns/BackendBindings/Python/Python.Build.Tasks/Test/Python.Build.Tasks.Tests.csproj +++ b/src/AddIns/BackendBindings/Python/Python.Build.Tasks/Test/Python.Build.Tasks.Tests.csproj @@ -37,10 +37,6 @@ - - ..\..\RequiredLibraries\IronMath.dll - False - ..\..\RequiredLibraries\IronPython.dll False diff --git a/src/Main/Base/Test/CodeConverterTests.cs b/src/Main/Base/Test/CodeConverterTests.cs index 1e42ead7c3..9e6499dcaf 100644 --- a/src/Main/Base/Test/CodeConverterTests.cs +++ b/src/Main/Base/Test/CodeConverterTests.cs @@ -489,6 +489,36 @@ namespace ICSharpCode.SharpDevelop.Tests DefaultUsingsCSharp + "class Test\n{\n}"); } + [Test] + public void CallMethodOnModule() + { + TestProgramVB2CS("Class Test\n" + + " Sub A\n" + + " Method(Field)\n" + + " End Sub\n" + + "End Class\n" + + "Module TheModule\n" + + " Sub Method(a As Integer)\n" + + " End Sub\n" + + " Public Field As Integer\n" + + "End Module", + DefaultUsingsCSharp + + "class Test\n" + + "{\n" + + " public void A()\n" + + " {\n" + + " TheModule.Method(TheModule.Field);\n" + + " }\n" + + "}\n" + + "static class TheModule\n" + + "{\n" + + " public static void Method(int a)\n" + + " {\n" + + " }\n" + + " public static int Field;\n" + + "}"); + } + #region Casting [Test] public void CastToEnum()