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

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

[dotgnu-pnet-commits] cscctest ChangeLog csharp/stmt/Makefile.am csha...


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] cscctest ChangeLog csharp/stmt/Makefile.am csha...
Date: Fri, 26 Dec 2008 10:25:19 +0000

CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    cscctest
Changes by:     Klaus Treichel <ktreichel>      08/12/26 10:25:19

Modified files:
        .              : ChangeLog 
        csharp/stmt    : Makefile.am 
Added files:
        csharp/stmt    : fixed1.cs fixed1.err fixed1.jerr 

Log message:
        Add some tests for the fixed statement.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cscctest/ChangeLog?cvsroot=dotgnu-pnet&r1=1.179&r2=1.180
http://cvs.savannah.gnu.org/viewcvs/cscctest/csharp/stmt/Makefile.am?cvsroot=dotgnu-pnet&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/cscctest/csharp/stmt/fixed1.cs?cvsroot=dotgnu-pnet&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/cscctest/csharp/stmt/fixed1.err?cvsroot=dotgnu-pnet&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/cscctest/csharp/stmt/fixed1.jerr?cvsroot=dotgnu-pnet&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/ChangeLog,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -b -r1.179 -r1.180
--- ChangeLog   26 Dec 2008 08:05:04 -0000      1.179
+++ ChangeLog   26 Dec 2008 10:25:18 -0000      1.180
@@ -5,6 +5,11 @@
        csharp/expr/is1.err, csharp/expr/is1.il, csharp/expr/is1.jerr: Reflect
        latest compiler changes.
 
+       * csharp/stmt/fixed1.cs, csharp/stmt/fixed1.err, 
csharp/stmt/fixed1.jerr:
+       Add some tests for the fixed statement.
+
+       * csharp/stmt/Makefile.am: Add fixed1.cs to the tests.
+
 2008-08-16  Klaus Treichel  <address@hidden>
 
        * csharp/expr/invoke3.cs, csharp/expr/invoke3.il, 
csharp/expr/invoke3.jl:

Index: csharp/stmt/Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/csharp/stmt/Makefile.am,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- csharp/stmt/Makefile.am     14 Oct 2007 20:14:01 -0000      1.18
+++ csharp/stmt/Makefile.am     26 Dec 2008 10:25:19 -0000      1.19
@@ -1,6 +1,7 @@
 
 TESTS = block1.cs \
                block2.cs \
+               fixed1.cs \
                foreach1.cs \
                foreach2.cs \
                foreach3.cs \

Index: csharp/stmt/fixed1.cs
===================================================================
RCS file: csharp/stmt/fixed1.cs
diff -N csharp/stmt/fixed1.cs
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ csharp/stmt/fixed1.cs       26 Dec 2008 10:25:19 -0000      1.1
@@ -0,0 +1,55 @@
+/*
+ * fixed1.cs - Test the handling of "fixed" statements.
+ *
+ * Copyright (C) 2008  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
+ */
+
+class Test
+{
+       unsafe void t1(int[] array)
+       {
+               fixed(int * intPtr = &array[0])
+               {
+               }
+
+               fixed(void * voidPtr = &array[0])
+               {
+               }               
+       }
+
+       unsafe void t2(int[] array)
+       {
+               fixed(int * intPtr = array)
+               {
+               }
+
+               fixed(void * voidPtr = array)
+               {
+               }               
+       }
+
+       unsafe void t3(string str)
+       {
+               fixed(char * charPtr = str)
+               {
+               }
+
+               fixed(void * voidPtr = str)
+               {
+               }               
+       }
+}

Index: csharp/stmt/fixed1.err
===================================================================
RCS file: csharp/stmt/fixed1.err
diff -N csharp/stmt/fixed1.err
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ csharp/stmt/fixed1.err      26 Dec 2008 10:25:19 -0000      1.1
@@ -0,0 +1,11 @@
+./fixed1.cs:23: warning: unsafe method declaration
+./fixed1.cs:27: warning: unsafe `fixed' statement
+./fixed1.cs:25: warning: unsafe address operator
+./fixed1.cs:31: warning: unsafe `fixed' statement
+./fixed1.cs:29: warning: unsafe address operator
+./fixed1.cs:34: warning: unsafe method declaration
+./fixed1.cs:38: warning: unsafe `fixed' statement
+./fixed1.cs:42: warning: unsafe `fixed' statement
+./fixed1.cs:45: warning: unsafe method declaration
+./fixed1.cs:49: warning: unsafe `fixed' statement
+./fixed1.cs:53: warning: unsafe `fixed' statement

Index: csharp/stmt/fixed1.jerr
===================================================================
RCS file: csharp/stmt/fixed1.jerr
diff -N csharp/stmt/fixed1.jerr
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ csharp/stmt/fixed1.jerr     26 Dec 2008 10:25:19 -0000      1.1
@@ -0,0 +1,15 @@
+./fixed1.cs:23: unsafe method declaration not permitted with Java output
+./fixed1.cs:27: unsafe `fixed' statement not permitted with Java output
+./fixed1.cs:27: `fixed' disallowed when compiling to Java bytecode
+./fixed1.cs:31: unsafe `fixed' statement not permitted with Java output
+./fixed1.cs:31: `fixed' disallowed when compiling to Java bytecode
+./fixed1.cs:34: unsafe method declaration not permitted with Java output
+./fixed1.cs:38: unsafe `fixed' statement not permitted with Java output
+./fixed1.cs:38: `fixed' disallowed when compiling to Java bytecode
+./fixed1.cs:42: unsafe `fixed' statement not permitted with Java output
+./fixed1.cs:42: `fixed' disallowed when compiling to Java bytecode
+./fixed1.cs:45: unsafe method declaration not permitted with Java output
+./fixed1.cs:49: unsafe `fixed' statement not permitted with Java output
+./fixed1.cs:49: `fixed' disallowed when compiling to Java bytecode
+./fixed1.cs:53: unsafe `fixed' statement not permitted with Java output
+./fixed1.cs:53: `fixed' disallowed when compiling to Java bytecode




reply via email to

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