dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: cscctest/csharp/stmt using3.cs,NONE,1.1 usin


From: Gopal.V <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: cscctest/csharp/stmt using3.cs,NONE,1.1 using3.il,NONE,1.1 using3.jl,NONE,1.1 using4.cs,NONE,1.1 using4.err,NONE,1.1 using4.jerr,NONE,1.1 Makefile.am,1.13,1.14
Date: Mon, 09 Dec 2002 18:39:24 -0500

Update of /cvsroot/dotgnu-pnet/cscctest/csharp/stmt
In directory subversions:/tmp/cvs-serv1684/csharp/stmt

Modified Files:
        Makefile.am 
Added Files:
        using3.cs using3.il using3.jl using4.cs using4.err using4.jerr 
Log Message:
ILNode_Test cases


--- NEW FILE ---
/*
 * using3.cs - Test using statement
 *
 * Copyright (C) 2002  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

using System;
public class Disposable : IDisposable
{
        public void Dispose()
        {
        }
}
public class XYZ
{
        public static void Main()
        {
                using(Disposable disposable=new Disposable())
                {
                }
                using(new Disposable())
                {
                }
        }
}

--- NEW FILE ---
.assembly extern '.library'
{
        .ver 0:0:0:0
}
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.class public auto ansi 'Disposable' extends ['.library']'System'.'Object' 
implements ['.library']'System'.'IDisposable'
{
.method public hidebysig instance void 'Dispose'() cil managed 
{
        ret
        .maxstack 0
} // method Dispose
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil 
managed 
{
        ldarg.0
        call    instance void ['.library']'System'.'Object'::'.ctor'()
        ret
        .maxstack 1
} // method .ctor
} // class Disposable
.class public auto ansi 'XYZ' extends ['.library']'System'.'Object'
{
.method public static hidebysig void 'Main'() cil managed 
{
        .locals (class 'Disposable')
        newobj  instance void 'Disposable'::'.ctor'()
        stloc.0
        .try {
        leave   ?L1
        } finally {
        ldloc.0
        brfalse ?L2
        ldloc.0
        callvirt        instance void [.library]System.IDisposable::Dispose()
        endfinally
?L2:
        }
?L1:
        .locals (class ['.library']'System'.'IDisposable')
        newobj  instance void 'Disposable'::'.ctor'()
        stloc.1
        .try {
        leave   ?L3
        } finally {
        ldloc.1
        brfalse ?L4
        ldloc.1
        callvirt        instance void [.library]System.IDisposable::Dispose()
        endfinally
?L4:
        }
?L3:
        ret
        .maxstack 1
} // method Main
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil 
managed 
{
        ldarg.0
        call    instance void ['.library']'System'.'Object'::'.ctor'()
        ret
        .maxstack 1
} // method .ctor
} // class XYZ

--- NEW FILE ---
.assembly extern '.library'
{
        .ver 0:0:0:0
}
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.class public auto ansi 'Disposable' extends ['.library']'System'.'Object' 
implements ['.library']'System'.'IDisposable'
{
.method public hidebysig instance void 'Dispose'() cil managed java 
{
        return
        .locals 1
        .maxstack 0
} // method Dispose
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil 
managed java 
{
        aload_0
        invokespecial   instance void ['.library']'System'.'Object'::'.ctor'()
        return
        .locals 1
        .maxstack 1
} // method .ctor
} // class Disposable
.class public auto ansi 'XYZ' extends ['.library']'System'.'Object'
{
.method public static hidebysig void 'Main'() cil managed java 
{
        return
        .locals 1
        .maxstack 0
} // method Main
.method public hidebysig specialname rtspecialname instance void '.ctor'() cil 
managed java 
{
        aload_0
        invokespecial   instance void ['.library']'System'.'Object'::'.ctor'()
        return
        .locals 1
        .maxstack 1
} // method .ctor
} // class XYZ

--- NEW FILE ---
/*
 * using4.cs - Test using statement(error)
 *
 * Copyright (C) 2002  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

using System;
public class Disposable
{
        public void Dispose()
        {
        }
}
public class XYZ
{
        public static void Main()
        {
                using(Disposable disposable=new Disposable())
                {
                }
                using(new Disposable())
                {
                }
        }
}

--- NEW FILE ---
./using4.cs:32: `Disposable' does not implement 'IDisposable' interface 
./using4.cs:35: 'Disposable' does not implement 'IDisposable'

--- NEW FILE ---
./using4.cs:32: `Disposable' does not implement 'IDisposable' interface 
./using4.cs:35: 'Disposable' does not implement 'IDisposable'

Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/csharp/stmt/Makefile.am,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** Makefile.am 17 Nov 2002 09:20:49 -0000      1.13
--- Makefile.am 9 Dec 2002 23:39:22 -0000       1.14
***************
*** 20,24 ****
                switch5.cs \
                using1.cs \
!               using2.cs
  
  TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tools/run_test.sh
--- 20,26 ----
                switch5.cs \
                using1.cs \
!               using2.cs \
!               using3.cs \
!               using4.cs
  
  TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tools/run_test.sh




reply via email to

[Prev in Thread] Current Thread [Next in Thread]