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/class indexer1.cs,NONE,1.1 in


From: Gopal.V <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: cscctest/csharp/class indexer1.cs,NONE,1.1 indexer1.il,NONE,1.1 indexer1.jl,NONE,1.1 Makefile.am,1.27,1.28
Date: Mon, 11 Nov 2002 19:00:04 -0500

Update of /cvsroot/dotgnu-pnet/cscctest/csharp/class
In directory subversions:/tmp/cvs-serv11197/csharp/class

Modified Files:
        Makefile.am 
Added Files:
        indexer1.cs indexer1.il indexer1.jl 
Log Message:
test cases for varargs indexers


--- NEW FILE ---
/*
 * indexer1.cs - Test indexer declarations and access
 *
 * Copyright (C) 2001  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 TestIndexer
{
        public int this[ int x, params object[] args]
        {
                get 
                { 
                        return x; 
                }
                set
                {
                }
        }
        public void test()
        {
                this[1,2,3,4,5,6,7,8,9]=42;
                int x=this[12,22,34,45];
        }
}

--- NEW FILE ---
.assembly extern '.library'
{
        .ver 0:0:0:0
}
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.class public auto ansi 'TestIndexer' extends ['.library']'System'.'Object'
{
.method public hidebysig specialname instance int32 'get_Item'(int32 'x', class 
['.library']'System'.'Object'[] 'args') cil managed 
{
.param[2]
.custom instance void ['.library']'System'.'ParamArrayAttribute'::'.ctor'() = 
(01 00 00 00)
        ldarg.1
        ret
        .maxstack 1
} // method get_Item
.method public hidebysig specialname instance void 'set_Item'(int32 'x', class 
['.library']'System'.'Object'[] 'args', int32 'value') cil managed 
{
.param[2]
.custom instance void ['.library']'System'.'ParamArrayAttribute'::'.ctor'() = 
(01 00 00 00)
        ret
        .maxstack 0
} // method set_Item
.property instance int32 'Item'(int32, class ['.library']'System'.'Object'[])
{
        .get instance int32 'TestIndexer'::'get_Item'(int32, class 
['.library']'System'.'Object'[])
        .set instance void 'TestIndexer'::'set_Item'(int32, class 
['.library']'System'.'Object'[], int32)
} // property Item
.method public hidebysig instance void 'test'() cil managed 
{
        .locals (int32)
        ldarg.0
        ldc.i4.1
        ldc.i4.8
        newarr  ['.library']'System'.'Object'
        dup
        ldc.i4.0
        ldc.i4.2
        box     ['.library']'System'.'Int32'
        stelem.ref
        dup
        ldc.i4.1
        ldc.i4.3
        box     ['.library']'System'.'Int32'
        stelem.ref
        dup
        ldc.i4.2
        ldc.i4.4
        box     ['.library']'System'.'Int32'
        stelem.ref
        dup
        ldc.i4.3
        ldc.i4.5
        box     ['.library']'System'.'Int32'
        stelem.ref
        dup
        ldc.i4.4
        ldc.i4.6
        box     ['.library']'System'.'Int32'
        stelem.ref
        dup
        ldc.i4.5
        ldc.i4.7
        box     ['.library']'System'.'Int32'
        stelem.ref
        dup
        ldc.i4.6
        ldc.i4.8
        box     ['.library']'System'.'Int32'
        stelem.ref
        dup
        ldc.i4.7
        ldc.i4.s        9
        box     ['.library']'System'.'Int32'
        stelem.ref
        ldc.i4.s        42
        call    instance void 'TestIndexer'::'set_Item'(int32, class 
['.library']'System'.'Object'[], int32)
        ldarg.0
        ldc.i4.s        12
        ldc.i4.3
        newarr  ['.library']'System'.'Object'
        dup
        ldc.i4.0
        ldc.i4.s        22
        box     ['.library']'System'.'Int32'
        stelem.ref
        dup
        ldc.i4.1
        ldc.i4.s        34
        box     ['.library']'System'.'Int32'
        stelem.ref
        dup
        ldc.i4.2
        ldc.i4.s        45
        box     ['.library']'System'.'Int32'
        stelem.ref
        call    instance int32 'TestIndexer'::'get_Item'(int32, class 
['.library']'System'.'Object'[])
        stloc.0
        ret
        .maxstack 6
} // method test
.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 TestIndexer

--- NEW FILE ---
.assembly extern '.library'
{
        .ver 0:0:0:0
}
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.class public auto ansi 'TestIndexer' extends ['.library']'System'.'Object'
{
.method public hidebysig specialname instance int32 'get_Item'(int32 'x', class 
['.library']'System'.'Object'[] 'args') cil managed java 
{
.param[2]
.custom instance void ['.library']'System'.'ParamArrayAttribute'::'.ctor'() = 
(01 00 00 00)
        iload_1
        ireturn
        .locals 3
        .maxstack 1
} // method get_Item
.method public hidebysig specialname instance void 'set_Item'(int32 'x', class 
['.library']'System'.'Object'[] 'args', int32 'value') cil managed java 
{
.param[2]
.custom instance void ['.library']'System'.'ParamArrayAttribute'::'.ctor'() = 
(01 00 00 00)
        return
        .locals 4
        .maxstack 0
} // method set_Item
.property instance int32 'Item'(int32, class ['.library']'System'.'Object'[])
{
        .get instance int32 'TestIndexer'::'get_Item'(int32, class 
['.library']'System'.'Object'[])
        .set instance void 'TestIndexer'::'set_Item'(int32, class 
['.library']'System'.'Object'[], int32)
} // property Item
.method public hidebysig instance void 'test'() cil managed java 
{
        aload_0
        iconst_1
        bipush  8
        anewarray class ['.library']'System'.'Object'
        dup
        iconst_0
        iconst_2
        invokestatic    "System/Int32" "copyIn__" "(I)LSystem/Int32;"
        aastore
        dup
        iconst_1
        iconst_3
        invokestatic    "System/Int32" "copyIn__" "(I)LSystem/Int32;"
        aastore
        dup
        iconst_2
        iconst_4
        invokestatic    "System/Int32" "copyIn__" "(I)LSystem/Int32;"
        aastore
        dup
        iconst_3
        iconst_5
        invokestatic    "System/Int32" "copyIn__" "(I)LSystem/Int32;"
        aastore
        dup
        iconst_4
        bipush  6
        invokestatic    "System/Int32" "copyIn__" "(I)LSystem/Int32;"
        aastore
        dup
        iconst_5
        bipush  7
        invokestatic    "System/Int32" "copyIn__" "(I)LSystem/Int32;"
        aastore
        dup
        bipush  6
        bipush  8
        invokestatic    "System/Int32" "copyIn__" "(I)LSystem/Int32;"
        aastore
        dup
        bipush  7
        bipush  9
        invokestatic    "System/Int32" "copyIn__" "(I)LSystem/Int32;"
        aastore
        bipush  42
        invokespecial   instance void 'TestIndexer'::'set_Item'(int32, class 
['.library']'System'.'Object'[], int32)
        aload_0
        bipush  12
        iconst_3
        anewarray class ['.library']'System'.'Object'
        dup
        iconst_0
        bipush  22
        invokestatic    "System/Int32" "copyIn__" "(I)LSystem/Int32;"
        aastore
        dup
        iconst_1
        bipush  34
        invokestatic    "System/Int32" "copyIn__" "(I)LSystem/Int32;"
        aastore
        dup
        iconst_2
        bipush  45
        invokestatic    "System/Int32" "copyIn__" "(I)LSystem/Int32;"
        aastore
        invokespecial   instance int32 'TestIndexer'::'get_Item'(int32, class 
['.library']'System'.'Object'[])
        istore_1
        return
        .locals 2
        .maxstack 6
} // method test
.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 TestIndexer

Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/csharp/class/Makefile.am,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** Makefile.am 9 Nov 2002 00:07:03 -0000       1.27
--- Makefile.am 12 Nov 2002 00:00:00 -0000      1.28
***************
*** 17,20 ****
--- 17,21 ----
                field4.cs \
                field5.cs \
+               indexer1.cs \
                interface1.cs \
                interface2.cs \





reply via email to

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