+2004-03-08 Nick Drochak <ndrochak@ieee.org>
+
+ * VBCodeProviderTest.cs: On windows, do not use mono to execute
+ assembly. Actually, this should be if running on MS's CLR, but
+ for now it will do.
+
2004-02-04 Jackson Harper <jackson@ximian.com>
* VBCodeProviderTest.cs: Use mono to execute assembly.
\r
namespace MonoTests.System.Microsoft.VisualBasic\r
{\r
+\r
+ enum OsType {\r
+ Windows,\r
+ Unix,\r
+ Mac\r
+ }\r
+\r
[TestFixture]\r
public class VBCodeProviderTest : Assertion {\r
\r
CodeDomProvider MyVBCodeProvider;\r
+ static OsType OS;\r
+ static char DSC = Path.DirectorySeparatorChar;\r
\r
[SetUp]\r
public void GetReady() { \r
+ if ('/' == DSC) {\r
+ OS = OsType.Unix;\r
+ } else if ('\\' == DSC) {\r
+ OS = OsType.Windows;\r
+ } else {\r
+ OS = OsType.Mac;\r
+ }\r
+\r
MyVBCodeProvider = new VBCodeProvider(); \r
}\r
\r
\r
// Execute the test app\r
ProcessStartInfo NewProcInfo = new ProcessStartInfo();\r
- NewProcInfo.FileName = "mono";\r
- NewProcInfo.Arguments = MyVBCodeCompilerResults.CompiledAssembly.Location;\r
+ if (Windows) {\r
+ NewProcInfo.FileName = MyVBCodeCompilerResults.CompiledAssembly.Location;\r
+ }\r
+ else {\r
+ NewProcInfo.FileName = "mono";\r
+ NewProcInfo.Arguments = MyVBCodeCompilerResults.CompiledAssembly.Location;\r
+ }\r
NewProcInfo.RedirectStandardOutput = true;\r
NewProcInfo.UseShellExecute = false;\r
NewProcInfo.CreateNoWindow = true;\r
}\r
catch (Exception ex)\r
{\r
- Assert("#JW34 - " + ex.Message + Environment.NewLine + ex.StackTrace, false);\r
+ Fail("#JW34 - " + ex.Message + Environment.NewLine + ex.StackTrace);\r
}\r
AssertEquals("#JW33 - Application output", "Hello world!", TestAppOutput);\r
\r
//System.Runtime.Remoting.ObjRef CreateObjRef(System.Type requestedType)\r
}\r
\r
+ bool Windows\r
+ {\r
+ get {\r
+ return OS == OsType.Windows;\r
+ }\r
+ }\r
+\r
+ bool Unix\r
+ {\r
+ get {\r
+ return OS == OsType.Unix;\r
+ }\r
+ }\r
+\r
+ bool Mac\r
+ {\r
+ get {\r
+ return OS == OsType.Mac;\r
+ }\r
+ }\r
+\r
}\r
}\r