[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/csunit TestMain.cs,1.3,1.4
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/csunit TestMain.cs,1.3,1.4 |
Date: |
Thu, 28 Nov 2002 22:53:45 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/csunit
In directory subversions:/tmp/cvs-serv18323/csunit
Modified Files:
TestMain.cs
Log Message:
Make "csunit" more robust when testing the ECMA-compatible version of pnetlib.
Index: TestMain.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/csunit/TestMain.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** TestMain.cs 23 Jul 2002 01:11:45 -0000 1.3
--- TestMain.cs 29 Nov 2002 03:53:43 -0000 1.4
***************
*** 123,130 ****
// exception if something went wrong, which will
// cause the program to exit with an
explaination.
! assembly = Assembly.Load("file://" + filename);
// Look for the test type within the assembly.
! type = assembly.GetType(typeName, false);
if(type == null)
{
--- 123,153 ----
// exception if something went wrong, which will
// cause the program to exit with an
explaination.
! // Use "Assembly.LoadFrom" if present (it may
not
! // be present if mscorilb.dll is
ECMA-compatible,
! // so we have to be careful how we invoke it).
! MethodInfo loadFrom =
! typeof(Assembly).GetMethod
! ("LoadFrom",
! BindingFlags.Static |
BindingFlags.Public);
! if(loadFrom != null)
! {
! Object[] args = new Object [1];
! args[0] = filename;
! assembly =
(Assembly)(loadFrom.Invoke(null, args));
! }
! else
! {
! assembly = Assembly.Load("file://" +
filename);
! }
// Look for the test type within the assembly.
! try
! {
! type = assembly.GetType(typeName);
! }
! catch(TypeLoadException)
! {
! type = null;
! }
if(type == null)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/csunit TestMain.cs,1.3,1.4,
Rhys Weatherley <address@hidden> <=