Added ifdefs, projects, solutions and support for TARGET_JVM.
authorBoris Kirzner <borisk@mono-cvs.ximian.com>
Thu, 26 Jan 2006 16:01:10 +0000 (16:01 -0000)
committerBoris Kirzner <borisk@mono-cvs.ximian.com>
Thu, 26 Jan 2006 16:01:10 +0000 (16:01 -0000)
svn path=/trunk/mcs/; revision=56106

19 files changed:
mcs/nunit20/ChangeLog
mcs/nunit20/core/AssemblyInfo.cs
mcs/nunit20/core/ChangeLog
mcs/nunit20/core/RemoteTestRunner.cs
mcs/nunit20/core/TestSuiteBuilder.cs
mcs/nunit20/core/nunit.core.dll.J2EE.vmwcsproj [new file with mode: 0644]
mcs/nunit20/framework/AssemblyInfo.cs
mcs/nunit20/framework/ChangeLog
mcs/nunit20/framework/nunit.framework.dll.J2EE.vmwcsproj [new file with mode: 0644]
mcs/nunit20/nunit-console/ChangeLog
mcs/nunit20/nunit-console/ConsoleUi.cs
mcs/nunit20/nunit-console/nunit-console.J2EE.vmwcsproj [new file with mode: 0644]
mcs/nunit20/nunit.java.sln [new file with mode: 0644]
mcs/nunit20/util/AssemblyInfo.cs
mcs/nunit20/util/ChangeLog
mcs/nunit20/util/ProjectPath.cs
mcs/nunit20/util/TestDomain.cs
mcs/nunit20/util/TestExceptionHandler.cs
mcs/nunit20/util/nunit.util.dll.J2EE.vmwcsproj [new file with mode: 0644]

index 76aaa8ce11f2d92deeed7b79fc4cbb87a65e552f..3687be6343b4920fe0fa89c51ac0173977b0c6ca 100755 (executable)
@@ -1,3 +1,6 @@
+2006-01-25 Boris Kirzner <borisl@mainsoft.com>
+       * nunit.java.sln: added solution file for TARGET_JVM.
+
 Wed Apr 20 18:05:41 CEST 2005 Paolo Molaro <lupus@ximian.com>
 
        * */AssemblyInfo.cs: fixed path to key file.
index d8381544bf93279be6a9d2dd26da1de40641e6ae..f87088a88dfdc58dc36f08f8363326539d1bd2da 100644 (file)
@@ -2,7 +2,9 @@ using System;
 using System.Reflection;
 using System.Runtime.CompilerServices;
 
+#if !TARGET_JVM
 [assembly: CLSCompliant(true)]
+#endif
 //
 // General Information about an assembly is controlled through the following 
 // set of attributes. Change these attribute values to modify the information
index 8494a6bfbc6a6cf1a6bb1d0cacb431c6429741d4..e459b9f46d811c7b491aa56dd72dec0ddcdf5bbd 100755 (executable)
@@ -1,3 +1,8 @@
+2006-01-25 Boris Kirzner <borisk@mainsoft.com>
+       * AssemblyInfo.cs, TestSuiteBuilder.cs : added #ifdef for features
+       not supported in TARGET_JVM.
+       * nunit.core.dll.J2EE.vmwcsproj: added project file for TARGET_JVM.
+
 2005-01-13  Atsushi Enomoto  <atsushi@ximian.com>
 
        * ConsoleWriter.cs : Flush() should call that of input writer.
index e023565ddce7bea01e7789046aea556f2a21c5fe..1e6f375497ae2024e511ba07359a30c4bb7ab384 100644 (file)
@@ -373,12 +373,12 @@ namespace NUnit.Core
                        // This is exactly what happens when we are testing NUnit itself.
                        saveOut = Console.Out;
                        saveError = Console.Error;
-
+#if !TARGET_JVM
                        // Set Console to go to our buffers. Note that any changes made by
                        // the user in the test code or the code it calls will defeat this.
                        Console.SetOut( outBuffer );
                        Console.SetError( errorBuffer ); 
-
+#endif
                        // Save the current directory so we can run each test in
                        // the same directory as its assembly
                        currentDirectory = Environment.CurrentDirectory;
index 665b6c62849be992c34c7f125b86dee10342829f..014c275cbb66a206e690764b6ecb8b568000b68e 100644 (file)
@@ -84,7 +84,11 @@ namespace NUnit.Core
                                if ( swap )
                                        Environment.CurrentDirectory = assemblyDirectory;
 
+#if !TARGET_JVM
                                Assembly assembly = AppDomain.CurrentDomain.Load(Path.GetFileNameWithoutExtension(assemblyName));
+#else
+                               Assembly assembly = Assembly.Load(Path.GetFileNameWithoutExtension(assemblyName));
+#endif
 
                                foreach( AssemblyName refAssembly in assembly.GetReferencedAssemblies() )
                                {
@@ -135,7 +139,11 @@ namespace NUnit.Core
                                // Assume that testName is a namespace
                                string prefix = testName + '.';
 
+#if !TARGET_JVM
                                Type[] testTypes = assembly.GetExportedTypes();
+#else
+                               Type[] testTypes = GetAssemblyExportedTypes(assembly);
+#endif
                                int testFixtureCount = 0;
 
                                foreach(Type type in testTypes)
@@ -258,7 +266,11 @@ namespace NUnit.Core
 
                        builder.rootSuite = new AssemblyTestSuite( assemblyName, assemblyKey );
                        int testFixtureCount = 0;
+#if !TARGET_JVM
                        Type[] testTypes = assembly.GetExportedTypes();
+#else
+                       Type[] testTypes = GetAssemblyExportedTypes(assembly);
+#endif
                        foreach(Type testType in testTypes)
                        {
                                if( CanMakeSuite( testType ) )
@@ -281,6 +293,29 @@ namespace NUnit.Core
                        return builder.rootSuite;
                }
 
+#if TARGET_JVM
+               private Type[] GetAssemblyExportedTypes(Assembly assembly)
+               {
+                       Type[] allTypes = null;
+                       try
+                       {
+                               allTypes = assembly.GetTypes();
+                       }
+                       catch (Exception e) 
+                       {
+                           System.Console.WriteLine("ReflectionTypeLoadException error");
+                       }
+                       ArrayList tmpTestTypes = new ArrayList(allTypes.Length);
+                       foreach(Type current in allTypes)
+                       {
+                               if (current.IsPublic || current.IsNestedPublic)
+                               {
+                                       tmpTestTypes.Add(current);
+                               }
+                       }
+                       return (Type[])tmpTestTypes.ToArray(typeof(Type));
+               }
+#endif
                /// <summary>
                /// Helper routine that makes a suite from either a TestFixture or
                /// a legacy Suite property.
diff --git a/mcs/nunit20/core/nunit.core.dll.J2EE.vmwcsproj b/mcs/nunit20/core/nunit.core.dll.J2EE.vmwcsproj
new file mode 100644 (file)
index 0000000..8408042
--- /dev/null
@@ -0,0 +1,66 @@
+<VisualStudioProject>\r
+       <CSHARP ProjectType="Local" ProductVersion="7.10.3077" SchemaVersion="2.0" ProjectGuid="{7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}">\r
+               <Build>\r
+                       <Settings ApplicationIcon="" AssemblyKeyContainerName="" AssemblyName="nunit.core" AssemblyOriginatorKeyFile="" DefaultClientScript="JScript" DefaultHTMLPageLayout="Grid" DefaultTargetSchema="IE50" DelaySign="false" OutputType="Library" PreBuildEvent="" PostBuildEvent="" RootNamespace="NUnit.Core" RunPostBuildEvent="OnBuildSuccess" StartupObject="">\r
+                               <Config Name="Debug_Java" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="TARGET_JVM" DocumentationFile="" DebugSymbols="true" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="false" OutputPath="bin\Debug_Java\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4"/>\r
+                               <Config Name="Release_Java" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="TRACE;JAVA" DocumentationFile="" DebugSymbols="false" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="true" OutputPath="bin\Release_Java\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4"/>\r
+                               <Config Name="Debug" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="" DocumentationFile="" DebugSymbols="true" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="false" OutputPath="bin\Debug\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="1"/>\r
+                       </Settings>\r
+                       <References>\r
+                               <Reference Name="System" AssemblyName="System" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"/>\r
+                               <Reference Name="System.Data" AssemblyName="System.Data" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"/>\r
+                               <Reference Name="System.Xml" AssemblyName="System.Xml" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Xml.dll"/>\r
+                               <Reference Name="nunit.framework.dll.J2EE" Project="{39CC8FF7-EF1A-41A1-B727-42684211ECD1}" Package="{83B010C7-76FC-4FAD-A26C-00D7EFE60256}"/>\r
+                               <Reference Name="rt" AssemblyName="rt" HintPath="..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\jre5\rt.dll" Private="False"/>\r
+                       </References>\r
+               </Build>\r
+               <Files>\r
+                       <Include>\r
+                               <File RelPath="AssemblyInfo.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="CategoryFilter.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="CategoryManager.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="EmptyFilter.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="EventListener.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ExpectedExceptionTestCase.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="Filter.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="InvalidSuiteException.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="InvalidTestFixtureException.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ITest.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ITestEvents.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="LegacySuite.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="LongLivingMarshalByRefObject.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="NameFilter.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="NamespaceSuite.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="NormalTestCase.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="NoTestFixturesException.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="NotRunnableTestCase.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="NullListener.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="NunitException.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="Reflect.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="RemoteTestRunner.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="Results.xsd" BuildAction="Content"/>\r
+                               <File RelPath="Results.xsx" DependentUpon="Results.xsd" BuildAction="None"/>\r
+                               <File RelPath="ResultVisitor.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="RootTestSuite.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="StringTextWriter.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="Summary.xslt" BuildAction="Content"/>\r
+                               <File RelPath="TemplateTestCase.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="Test.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestAssembly.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestCase.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestCaseBuilder.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestCaseResult.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestEventArgs.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestEventDispatcher.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestFixture.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestResult.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestRunner.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestRunnerThread.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestSuite.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestSuiteBuilder.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestSuiteResult.cs" SubType="Code" BuildAction="Compile"/>\r
+                       </Include>\r
+               </Files>\r
+               <UserProperties project.JDKType="1.5.0_05" REFS.JarPath.rt="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\j2sdk1.4\lib\rt.jar" REFS.JarPath.system="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.jar" REFS.JarPath.system.data="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Data.jar" REFS.JarPath.system.xml="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Xml.jar" />\r
+       </CSHARP>\r
+       <VisualMainWin><Project Prop2023="1.5.0_05" Prop2024="" Prop2026="" Prop2015="" Version="1.7.0" ProjectType="1"/><References/><Configs><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="0" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Release_Java"/><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="0" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Debug_Java"/><Config Prop2000="1" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="0" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Debug"/></Configs></VisualMainWin></VisualStudioProject>\r
index 290ecc8019577938ce596360018fa6c87b2fabcf..c4d4d85d98db7c08cad9f22b11049b63ab631c8a 100644 (file)
@@ -2,7 +2,9 @@ using System;
 using System.Reflection;
 using System.Runtime.CompilerServices;
 
+#if !TARGET_JVM
 [assembly: CLSCompliant(true)]
+#endif
 //
 // General Information about an assembly is controlled through the following 
 // set of attributes. Change these attribute values to modify the information
index 8d7944ec444a8ecc68e10e98a76e8df02e6c572d..8c726802a3450b2dff038edd07f907be30429ded 100755 (executable)
@@ -1,3 +1,7 @@
+2006-01-25 Boris Kirzner <borisk@mainsoft.com>
+       * AssemblyInfo.cs: added #ifdef for features not supported in TARGET_JVM.
+       * nunit.framework.dll.J2EE.vmwcsproj: added project file for TARGET_JVM.
+
 2004-11-23  Raja R Harinath  <rharinath@novell.com>
 
        * Makefile (NO_INSTALL) [PROFILE=net_2_0]: Don't install dll.
diff --git a/mcs/nunit20/framework/nunit.framework.dll.J2EE.vmwcsproj b/mcs/nunit20/framework/nunit.framework.dll.J2EE.vmwcsproj
new file mode 100644 (file)
index 0000000..b64a6d4
--- /dev/null
@@ -0,0 +1,40 @@
+<VisualStudioProject>\r
+       <CSHARP ProjectType="Local" ProductVersion="7.10.3077" SchemaVersion="2.0" ProjectGuid="{39CC8FF7-EF1A-41A1-B727-42684211ECD1}">\r
+               <Build>\r
+                       <Settings ApplicationIcon="" AssemblyKeyContainerName="" AssemblyName="nunit.framework" AssemblyOriginatorKeyFile="" DefaultClientScript="JScript" DefaultHTMLPageLayout="Grid" DefaultTargetSchema="IE50" DelaySign="false" OutputType="Library" PreBuildEvent="" PostBuildEvent="" RootNamespace="NUnit.Framework" RunPostBuildEvent="OnBuildSuccess" StartupObject="">\r
+                               <Config Name="Debug_Java" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="TARGET_JVM" DocumentationFile="bin\Debug\nunit.framework.xml" DebugSymbols="true" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="1573, 1572" Optimize="false" OutputPath="bin\Debug_Java\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4"/>\r
+                               <Config Name="Release_Java" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="TRACE;JAVA" DocumentationFile="bin\Release\nunit.framework.xml" DebugSymbols="false" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="true" OutputPath="bin\Release_Java\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4"/>\r
+                               <Config Name="Debug" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="" DocumentationFile="" DebugSymbols="true" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="false" OutputPath="bin\Debug\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="1"/>\r
+                       </Settings>\r
+                       <References>\r
+                               <Reference Name="System" AssemblyName="System" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"/>\r
+                               <Reference Name="System.Data" AssemblyName="System.Data" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"/>\r
+                               <Reference Name="System.Xml" AssemblyName="System.Xml" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Xml.dll"/>\r
+                               <Reference Name="rt" AssemblyName="rt" HintPath="..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\jre5\rt.dll" Private="False"/>\r
+                       </References>\r
+               </Build>\r
+               <Files>\r
+                       <Include>\r
+                               <File RelPath="AssemblyInfo.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="Assert.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="Assertion.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="AssertionException.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="AssertionFailureMessage.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="CategoryAttribute.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ExpectedExceptionAttribute.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ExplicitAttribute.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="IgnoreAttribute.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="IgnoreException.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="OldTestCase.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="SetUpAttribute.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="SuiteAttribute.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TearDownAttribute.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestAttribute.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestFixtureAttribute.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestFixtureSetUpAttribute.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestFixtureTearDownAttribute.cs" SubType="Code" BuildAction="Compile"/>\r
+                       </Include>\r
+               </Files>\r
+               <UserProperties REFS.JarPath.system.xml="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Xml.jar" REFS.JarPath.system.data="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Data.jar" REFS.JarPath.system="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.jar" REFS.JarPath.rt="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\j2sdk1.4\lib\rt.jar" project.JDKType="1.5.0_05"/>\r
+       </CSHARP>\r
+       <VisualMainWin><Project Prop2023="1.5.0_05" Prop2024="" Prop2026="" Prop2015="" Version="1.7.0" ProjectType="1"/><References/><Configs><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="0" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Debug_Java"/><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="0" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Release_Java"/><Config Prop2000="1" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="0" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Debug"/></Configs></VisualMainWin></VisualStudioProject>\r
index d1594fcb373e47c077ccf1818121b6b9e935a7c2..776688a656f05401f12795b23fb79ff67c366cea 100644 (file)
@@ -1,3 +1,7 @@
+2006-01-25 Boris Kirzner <borisk@mainsoft.com>
+       * ConsoleUi.cs: added #ifdef for features not supported in TARGET_JVM.
+       * nunit-console.J2EE.vmwcsproj: added project file for TARGET_JVM.
+
 2006-01-12  Raja R Harinath  <rharinath@novell.com>
 
        * Makefile: Revert my '2006-01-10' commit.  Prefer the more
index 9c56d655546d675568cb048a66d94bf2b1ea0fab..91add9aff103a72358e14010f52a2bdc15985327 100644 (file)
@@ -151,8 +151,10 @@ namespace NUnit.Console
                        Console.WriteLine();
 
                        string clrPlatform = Type.GetType("Mono.Runtime", false) == null ? ".NET" : "Mono";
+#if !TARGET_JVM                        
                        Console.WriteLine( string.Format("OS Version: {0}    {1} Version: {2}",
                                Environment.OSVersion, clrPlatform, Environment.Version ) );
+#endif
                        Console.WriteLine();
                }
 
diff --git a/mcs/nunit20/nunit-console/nunit-console.J2EE.vmwcsproj b/mcs/nunit20/nunit-console/nunit-console.J2EE.vmwcsproj
new file mode 100644 (file)
index 0000000..5bcde07
--- /dev/null
@@ -0,0 +1,27 @@
+<VisualStudioProject>\r
+       <CSHARP ProjectType="Local" ProductVersion="7.10.3077" SchemaVersion="2.0" ProjectGuid="{EE901CF2-A263-471C-AEE2-2400A7105ABE}" SccProjectName="nunit.java" SccLocalPath=".." SccProvider="MSSCCI:ClearCase">\r
+               <Build>\r
+                       <Settings ApplicationIcon="" AssemblyKeyContainerName="" AssemblyName="nunit-console" AssemblyOriginatorKeyFile="" DefaultClientScript="JScript" DefaultHTMLPageLayout="Grid" DefaultTargetSchema="IE50" DelaySign="false" OutputType="Exe" PreBuildEvent="" PostBuildEvent="" RootNamespace="nunit_console" RunPostBuildEvent="OnBuildSuccess" StartupObject="">\r
+                               <Config Name="Debug_Java" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="DEBUG;TRACE;JAVA;TARGET_JVM;GHT_MARSHAL_BY_REF_OBJECT;GHT_THREAD_ABORT;GHT_ENVIRONMENT_OSVERSION;GHT_ASSEMBLYNAME_VERSION;ASSEMBLY_GETASSEMBLY" DocumentationFile="" DebugSymbols="true" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="618" Optimize="false" OutputPath="bin\Debug_Java\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4"/>\r
+                               <Config Name="Release_Java" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="TRACE;JAVA;GHT_ENVIRONMENT_OSVERSION" DocumentationFile="" DebugSymbols="false" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="618" Optimize="true" OutputPath="bin\Release_Java\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4"/>\r
+                       </Settings>\r
+                       <References>\r
+                               <Reference Name="System" AssemblyName="System" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"/>\r
+                               <Reference Name="System.Data" AssemblyName="System.Data" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"/>\r
+                               <Reference Name="System.Xml" AssemblyName="System.Xml" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Xml.dll"/>\r
+                               <Reference Name="rt" AssemblyName="rt" HintPath="..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\jre5\rt.dll" Private="False"/>\r
+                               <Reference Name="nunit.core.dll.J2EE" Project="{7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}" Package="{83B010C7-76FC-4FAD-A26C-00D7EFE60256}"/>\r
+                               <Reference Name="nunit.framework.dll.J2EE" Project="{39CC8FF7-EF1A-41A1-B727-42684211ECD1}" Package="{83B010C7-76FC-4FAD-A26C-00D7EFE60256}"/>\r
+                               <Reference Name="nunit.util.dll.J2EE" Project="{36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}" Package="{83B010C7-76FC-4FAD-A26C-00D7EFE60256}"/>\r
+                       </References>\r
+               </Build>\r
+               <Files>\r
+                       <Include>\r
+                               <File RelPath="AssemblyInfo.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ConsoleUi.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="nunit-console.exe.config" BuildAction="None"/>\r
+                       </Include>\r
+               </Files>\r
+               <UserProperties REFS.JarPath.system.xml="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Xml.jar" REFS.JarPath.system.data="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Data.jar" REFS.JarPath.system="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.jar" REFS.JarPath.rt="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\j2sdk1.4\lib\rt.jar" project.JDKType="1.5.0_05"/>\r
+       </CSHARP>\r
+       <VisualMainWin><Project Prop2023="1.5.0_05" Prop2024="" Prop2026="" Prop2015="" Version="1.7.0" ProjectType="1"/><References/><Configs><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="0" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Release_Java"/><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="C:\cygwin\monobuild\mcs\class\System.Drawing.1.7\Test\DrawingTest\Test\bin\Debug_Java\Test.jar" Prop2010="C:\cygwin\monobuild\mcs\class\System.Drawing.1.7\Test\DrawingTest\Test\bin\Debug" Prop2011="0" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Debug_Java"/></Configs></VisualMainWin></VisualStudioProject>\r
diff --git a/mcs/nunit20/nunit.java.sln b/mcs/nunit20/nunit.java.sln
new file mode 100644 (file)
index 0000000..76ea6de
--- /dev/null
@@ -0,0 +1,89 @@
+Microsoft Visual Studio Solution File, Format Version 8.00\r
+Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "nunit.framework.dll.J2EE", "framework\nunit.framework.dll.J2EE.vmwcsproj", "{39CC8FF7-EF1A-41A1-B727-42684211ECD1}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+       EndProjectSection\r
+EndProject\r
+Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "nunit.core.dll.J2EE", "core\nunit.core.dll.J2EE.vmwcsproj", "{7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+       EndProjectSection\r
+EndProject\r
+Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "nunit.util.dll.J2EE", "util\nunit.util.dll.J2EE.vmwcsproj", "{36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+       EndProjectSection\r
+EndProject\r
+Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "nunit-console.J2EE", "nunit-console\nunit-console.J2EE.vmwcsproj", "{EE901CF2-A263-471C-AEE2-2400A7105ABE}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+       EndProjectSection\r
+EndProject\r
+Global\r
+       GlobalSection(SourceCodeControl) = preSolution\r
+               SccNumberOfProjects = 1\r
+               SccProjectUniqueName0 = nunit-console\\nunit-console.J2EE.vmwcsproj\r
+               SccProjectName0 = nunit.java\r
+               SccLocalPath0 = .\r
+               SccProvider0 = MSSCCI:ClearCase\r
+               SccProjectFilePathRelativizedFromConnection0 = nunit-console\\\r
+       EndGlobalSection\r
+       GlobalSection(SolutionConfiguration) = preSolution\r
+               Debug = Debug\r
+               Debug_Java = Debug_Java\r
+               Debug_Net = Debug_Net\r
+               Debug_NetRef = Debug_NetRef\r
+               Debug-Strong = Debug-Strong\r
+               Release = Release\r
+               Release_Java = Release_Java\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfiguration) = postSolution\r
+               {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug.ActiveCfg = Debug_Java|.NET\r
+               {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug.Build.0 = Debug_Java|.NET\r
+               {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.ActiveCfg = Debug_Java|.NET\r
+               {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.Build.0 = Debug_Java|.NET\r
+               {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Net.ActiveCfg = Release_Java|.NET\r
+               {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_NetRef.ActiveCfg = Debug_Java|.NET\r
+               {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug-Strong.ActiveCfg = Debug_Java|.NET\r
+               {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug-Strong.Build.0 = Debug_Java|.NET\r
+               {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release.ActiveCfg = Release_Java|.NET\r
+               {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.ActiveCfg = Release_Java|.NET\r
+               {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.Build.0 = Release_Java|.NET\r
+               {7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}.Debug.ActiveCfg = Debug_Java|.NET\r
+               {7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}.Debug.Build.0 = Debug_Java|.NET\r
+               {7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}.Debug_Java.ActiveCfg = Debug_Java|.NET\r
+               {7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}.Debug_Java.Build.0 = Debug_Java|.NET\r
+               {7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}.Debug_Net.ActiveCfg = Release_Java|.NET\r
+               {7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}.Debug_NetRef.ActiveCfg = Debug_Java|.NET\r
+               {7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}.Debug-Strong.ActiveCfg = Debug_Java|.NET\r
+               {7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}.Debug-Strong.Build.0 = Debug_Java|.NET\r
+               {7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}.Release.ActiveCfg = Release_Java|.NET\r
+               {7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}.Release_Java.ActiveCfg = Release_Java|.NET\r
+               {7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}.Release_Java.Build.0 = Release_Java|.NET\r
+               {36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}.Debug.ActiveCfg = Debug_Java|.NET\r
+               {36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}.Debug.Build.0 = Debug_Java|.NET\r
+               {36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}.Debug_Java.ActiveCfg = Debug_Java|.NET\r
+               {36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}.Debug_Java.Build.0 = Debug_Java|.NET\r
+               {36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}.Debug_Net.ActiveCfg = Release_Java|.NET\r
+               {36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}.Debug_NetRef.ActiveCfg = Debug_Java|.NET\r
+               {36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}.Debug-Strong.ActiveCfg = Debug_Java|.NET\r
+               {36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}.Debug-Strong.Build.0 = Debug_Java|.NET\r
+               {36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}.Release.ActiveCfg = Release_Java|.NET\r
+               {36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}.Release_Java.ActiveCfg = Release_Java|.NET\r
+               {36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}.Release_Java.Build.0 = Release_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Debug.ActiveCfg = Debug_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Debug.Build.0 = Debug_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Debug_Java.ActiveCfg = Debug_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Debug_Java.Build.0 = Debug_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Debug_Net.ActiveCfg = Debug_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Debug_Net.Build.0 = Debug_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Debug_NetRef.ActiveCfg = Debug_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Debug_NetRef.Build.0 = Debug_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Debug-Strong.ActiveCfg = Debug_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Debug-Strong.Build.0 = Debug_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Release.ActiveCfg = Release_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Release.Build.0 = Release_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Release_Java.ActiveCfg = Release_Java|.NET\r
+               {EE901CF2-A263-471C-AEE2-2400A7105ABE}.Release_Java.Build.0 = Release_Java|.NET\r
+       EndGlobalSection\r
+       GlobalSection(ExtensibilityGlobals) = postSolution\r
+       EndGlobalSection\r
+       GlobalSection(ExtensibilityAddIns) = postSolution\r
+       EndGlobalSection\r
+EndGlobal\r
index f18319daad9911bf0512a7c6c4fbe94c62096008..1a2c1e460458a1a2bad23fe4200fe2b418303589 100644 (file)
@@ -83,5 +83,9 @@ using System.Runtime.CompilerServices;
 //   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
 //       documentation for more information on this.
 //
+#if TARGET_JVM
+[assembly: AssemblyDelaySign(false)]
+#else
 [assembly: AssemblyKeyFile("../../../nunit.key")]
 [assembly: AssemblyKeyName("")]
+#endif
index ef7ef6b1e0d7b25f2922daf64557d5e52c11db93..c68e14979841ec3ebc21f6522bab48f32e796b7a 100644 (file)
@@ -1,3 +1,9 @@
+2006-01-25 Boris Kirzner <borisk@mainsoft.com>
+       * AssemblyInfo.cs, ProjectPath.cs, TestDomain.cs, TestExceptionHandler.cs:
+       added #ifdef and alternative implementation for features 
+       not supported in TARGET_JVM.
+       * nunit.util.dll.J2EE.vmwcsproj : added project file for TARGET_JVM.
+
 2005-07-03  Ben Maurer  <bmaurer@ximian.com>
 
        * Makefile: Fix so it really doesn't install for 2.0.
index 29e42e738c683ef26e917047ef3e8690278e7f70..837e5786487d6a500ff2b912f1449cf9d603d4c4 100644 (file)
@@ -31,7 +31,9 @@ using System;
 using System.IO;
 using System.Text;
 using System.Runtime.InteropServices;
-
+#if TARGET_JVM
+using System.Collections;
+#endif
 namespace NUnit.Util
 {
        /// <summary>
@@ -52,6 +54,7 @@ namespace NUnit.Util
                        return extension == ".dll" || extension == ".exe";
                }
 
+#if !TARGET_JVM
                /// <summary>
                /// Returns the relative path from a base directory to another
                /// directory or file.
@@ -80,16 +83,69 @@ namespace NUnit.Util
 
                        return sb.ToString();
                }
+#else
+               /// <summary>
+               /// Returns the relative path from a base directory to another
+               /// directory or file.
+               /// </summary>
+               public static string RelativePath( string from, string to )
+               {
+                       char dirSeperator = System.IO.Path.DirectorySeparatorChar;
+                       string upDirStr = @"..\";
+
+                       //Start by normalizing paths
+                       NormalizePath (ref from);
+                       NormalizePath (ref to);
 
+                       if ( !IsPathValid (from) || !IsPathValid (to) )
+                               return string.Empty;
+
+                       if (!System.IO.Path.IsPathRooted (to))
+                               return to;
+
+                       //First check if FullPath begins with the BasePath
+                       if ( to.StartsWith (from)) 
+                               return  to.Replace (from,".");
+
+                       //Now parse backwards
+                       StringBuilder backDirs = new StringBuilder ();
+                       string partialPath = from;
+                       int index = partialPath.LastIndexOf (dirSeperator);
+                       while (index > 0) {
+                               //Strip path step string to last backslash and add another step backwards to our pass replacement
+                               partialPath = partialPath.Substring(0,index);
+                               backDirs.Append(upDirStr);
+
+                               //check if FullPath begins with the current partialPath
+                               if ( to.StartsWith(partialPath) )
+                                       if ( to == partialPath ) {
+                                               //Full Directory match and need to replace it all
+                                               backDirs.Remove (backDirs.Length-1, 1);
+                                               return backDirs.ToString ();
+                                       }
+                                       else //We're dealing with a file or a start path
+                                               return to.Replace (partialPath + dirSeperator, backDirs.ToString ());
+
+                               index = partialPath.LastIndexOf (dirSeperator, partialPath.Length-1);
+                       }                       
+                       //No common root found, return null.
+                       return null;
+               }
+#endif
                /// <summary>
                /// Return the canonical form of a path.
                public static string Canonicalize( string path )
                {
+#if !TARGET_JVM
                        StringBuilder sb = new StringBuilder( MAX_PATH );
                        if ( !PathCanonicalize( sb, path ) )
                                throw new ArgumentException( string.Format( "Invalid path passed to PathCanonicalize: {0}", path ) );
 
                        return sb.ToString();
+#else
+                       java.io.File pathObject = new java.io.File (path);
+                       return pathObject.getCanonicalPath ();
+#endif
                }
 
                /// <summary>
@@ -136,6 +192,7 @@ namespace NUnit.Util
 
                #endregion
 
+#if !TARGET_JVM
                #region Shlwapi functions used internally
 
                [DllImport("shlwapi.dll")]
@@ -158,5 +215,21 @@ namespace NUnit.Util
                        StringBuilder result );
                        
                #endregion
+#else
+               private static bool IsPathValid(string path)
+               {
+                       return (path!=string.Empty) && (path[0] != System.IO.Path.DirectorySeparatorChar);
+               }
+
+               private static void NormalizePath (ref string path)
+               {
+                       string dirSeperator = new string (new char [] {System.IO.Path.DirectorySeparatorChar});
+
+                       path = path.ToLower ();
+                       if (path.EndsWith (dirSeperator))
+                               path = path.Substring (0, path.Length - 1);
+               }
+
+#endif
        }
 }
index 9afaac45f8950bc91b9dd2f01fd7f17b606c3137..e6d4530813daab65058f29b0226fc7d30d2768f6 100644 (file)
@@ -120,12 +120,16 @@ namespace NUnit.Util
 
                private TestRunner MakeRemoteTestRunner( AppDomain runnerDomain )
                {
+#if !TARGET_JVM
                        object obj = runnerDomain.CreateInstanceAndUnwrap(
                                typeof(RemoteTestRunner).Assembly.FullName, 
                                typeof(RemoteTestRunner).FullName,
                                false, BindingFlags.Default,null,null,null,null,null);
                        
                        RemoteTestRunner runner = (RemoteTestRunner) obj;
+#else
+                       RemoteTestRunner runner = new RemoteTestRunner();
+#endif
 
                        runner.Out = this.outWriter;
                        runner.Error = this.errorWriter;
@@ -250,7 +254,7 @@ namespace NUnit.Util
                public void Unload()
                {
                        testRunner = null;
-
+#if !TARGET_JVM
                        if(domain != null) 
                        {
                                try
@@ -270,6 +274,7 @@ namespace NUnit.Util
                                        domain = null;
                                }
                        }
+#endif
                }
 
                public static string GetBinPath( string[] assemblies )
@@ -435,7 +440,7 @@ namespace NUnit.Util
                        string domainName = string.Format( "domain-{0}", Path.GetFileName( testFileName ) );
                        domain = MakeAppDomain( testFileName, appBase, configFile, binPath );
                }
-
+#if !TARGET_JVM
                /// <summary>
                /// This method creates appDomains for the framework.
                /// </summary>
@@ -477,6 +482,12 @@ namespace NUnit.Util
 
                        return runnerDomain;
                }
+#else
+               private AppDomain MakeAppDomain( string domainName, string appBase, string configFile, string binPath )
+               {
+                       return AppDomain.CurrentDomain;
+               }
+#endif
 
                /// <summary>
                /// Set the location for caching and delete any old cache info
index 2e370c22564619205096abc000712bff742022b2..5787ec8170ad7e42d4df6c7087f5a99b42f04c6a 100644 (file)
@@ -11,23 +11,28 @@ namespace NUnit.Util
 
                public TestExceptionHandler( UnhandledExceptionEventHandler handler )
                {
+#if !TARGET_JVM
                        this.handler = handler;
                        AppDomain.CurrentDomain.UnhandledException += handler;
+#endif
                }
 
                ~TestExceptionHandler()
                {
+#if  !TARGET_JVM
                        if ( handler != null )
                        {
                                AppDomain.CurrentDomain.UnhandledException -= handler;
                                handler = null;
                        }
+#endif
                }
 
 
 
                public void Dispose()
                {
+#if !TARGET_JVM
                        if ( handler != null )
                        {
                                AppDomain.CurrentDomain.UnhandledException -= handler;
@@ -35,6 +40,7 @@ namespace NUnit.Util
                        }
 
                        System.GC.SuppressFinalize( this );
+#endif
                }
        }
 }
diff --git a/mcs/nunit20/util/nunit.util.dll.J2EE.vmwcsproj b/mcs/nunit20/util/nunit.util.dll.J2EE.vmwcsproj
new file mode 100644 (file)
index 0000000..c985767
--- /dev/null
@@ -0,0 +1,56 @@
+<VisualStudioProject>\r
+       <CSHARP ProjectType="Local" ProductVersion="7.10.3077" SchemaVersion="2.0" ProjectGuid="{36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}">\r
+               <Build>\r
+                       <Settings ApplicationIcon="" AssemblyKeyContainerName="" AssemblyName="nunit.util" AssemblyOriginatorKeyFile="" DefaultClientScript="JScript" DefaultHTMLPageLayout="Grid" DefaultTargetSchema="IE50" DelaySign="false" OutputType="Library" PreBuildEvent="" PostBuildEvent="" RootNamespace="NUnit.Util" RunPostBuildEvent="OnBuildSuccess" StartupObject="">\r
+                               <Config Name="Debug_Java" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="TARGET_JVM" DocumentationFile="" DebugSymbols="true" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="false" OutputPath="bin\Debug_Java\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4"/>\r
+                               <Config Name="Release_Java" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="TRACE;JAVA" DocumentationFile="" DebugSymbols="false" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="true" OutputPath="bin\Release_Java\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4"/>\r
+                               <Config Name="Debug" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="" DocumentationFile="" DebugSymbols="true" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="false" OutputPath="bin\Debug\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="1"/>\r
+                       </Settings>\r
+                       <References>\r
+                               <Reference Name="System" AssemblyName="System" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"/>\r
+                               <Reference Name="System.Data" AssemblyName="System.Data" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"/>\r
+                               <Reference Name="System.Xml" AssemblyName="System.Xml" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Xml.dll"/>\r
+                               <Reference Name="System.Drawing" AssemblyName="System.Drawing" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"/>\r
+                               <Reference Name="nunit.core.dll.J2EE" Project="{7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}" Package="{83B010C7-76FC-4FAD-A26C-00D7EFE60256}"/>\r
+                               <Reference Name="nunit.framework.dll.J2EE" Project="{39CC8FF7-EF1A-41A1-B727-42684211ECD1}" Package="{83B010C7-76FC-4FAD-A26C-00D7EFE60256}"/>\r
+                               <Reference Name="rt" AssemblyName="rt" HintPath="..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\jre5\rt.dll" Private="False"/>\r
+                       </References>\r
+               </Build>\r
+               <Files>\r
+                       <Include>\r
+                               <File RelPath="AssemblyInfo.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="AssemblyList.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="AssemblyListItem.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="CommandLineOptions.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ConsoleOptions.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ConsoleWriter.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="GuiOptions.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ITestEvents.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ITestLoader.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="NUnitProject.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ProjectConfig.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ProjectConfigCollection.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ProjectFormatException.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ProjectPath.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="ResultSummarizer.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="SettingsGroup.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="SettingsStorage.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="StackTraceFilter.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="SummaryVisitor.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestDomain.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestEventArgs.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestEventDispatcher.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestExceptionHandler.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="TestResultItem.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="Transform.resx" BuildAction="EmbeddedResource"/>\r
+                               <File RelPath="UIHelper.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="UITestNode.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="VSProject.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="VSProjectConfig.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="VSProjectConfigCollection.cs" SubType="Code" BuildAction="Compile"/>\r
+                               <File RelPath="XmlResultVisitor.cs" SubType="Code" BuildAction="Compile"/>\r
+                       </Include>\r
+               </Files>\r
+               <UserProperties project.JDKType="1.5.0_05" REFS.JarPath.rt="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\j2sdk1.4\lib\rt.jar" REFS.JarPath.system="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.jar" REFS.JarPath.system.data="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Data.jar" REFS.JarPath.system.xml="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE\jgac\vmw4j2ee_110\System.Xml.jar" REFS.JarPath.system.drawing="" />\r
+       </CSHARP>\r
+       <VisualMainWin><Project Prop2023="1.5.0_05" Prop2024="" Prop2026="" Prop2015="" Version="1.7.0" ProjectType="1"/><References/><Configs><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="0" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Release_Java"/><Config Prop2000="0" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="0" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Debug_Java"/><Config Prop2000="1" Prop2001="0" Prop2002="0" Prop2003="0" Prop2004="0" Prop2005="0" Prop2006="" Prop2007="" Prop2008="" Prop2009="" Prop2010="" Prop2011="0" Prop2012="0" Prop2013="" Prop2014="0" Prop2016="" Prop2027="" Prop2019="0" Prop2020="285212672" Prop2021="4096" Prop2022="0" Prop2017="0" Prop2018="0" Name="Debug"/></Configs></VisualMainWin></VisualStudioProject>\r