[Monodevelop-patches-list] r2396 - in trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory: errors src tests
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Sat Mar 26 15:44:15 EST 2005
Author: jluke
Date: 2005-03-26 15:44:14 -0500 (Sat, 26 Mar 2005)
New Revision: 2396
Added:
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-1.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-10.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-11.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-12.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-13.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-14.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-2.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-3.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-4.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-5.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-6.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-7.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-8.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-9.cs
Modified:
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Main.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/tests/static-class-2.cs
Log:
tests for static classes
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-1.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-1.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-1.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,3 @@
+static class Foo : System.Object
+{
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-10.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-10.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-10.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,7 @@
+static class Foo
+{
+ static void Main ()
+ {
+ Foo f = new Foo ();
+ }
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-11.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-11.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-11.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,7 @@
+static class Foo
+{
+}
+
+class Bar : Foo
+{
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-12.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-12.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-12.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,6 @@
+static class Foo
+{
+ protected static int Bar {
+ get { return 2;}
+ }
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-13.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-13.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-13.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,6 @@
+static class Foo
+{
+ protected internal static int Bar {
+ get { return 2;}
+ }
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-14.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-14.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-14.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,4 @@
+static class Foo
+{
+ protected static int Bar = 2;
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-2.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-2.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-2.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,7 @@
+static class Foo : IFoo
+{
+}
+
+interface IFoo
+{
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-3.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-3.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-3.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,4 @@
+static class Foo
+{
+ void Bar ();
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-4.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-4.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-4.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,4 @@
+static class Foo
+{
+ int Bar = 2;
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-5.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-5.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-5.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,6 @@
+static class Foo
+{
+ int Bar {
+ get { return 2;}
+ }
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-6.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-6.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-6.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,6 @@
+static class Foo
+{
+ ~Foo ()
+ {
+ }
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-7.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-7.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-7.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,6 @@
+static class Foo
+{
+ Foo ()
+ {
+ }
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-8.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-8.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-8.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,3 @@
+static sealed class Foo
+{
+}
Added: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-9.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-9.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/errors/static-class-9.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -0,0 +1,3 @@
+static abstract class Foo
+{
+}
Modified: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Main.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Main.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Main.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -21,11 +21,16 @@
{
string fileName = file.FullName;
p.Parse (new Lexer (new FileReader (fileName)));
+
if (p.Errors.count == 0) {
ErrorVisitor ev = new ErrorVisitor();
ev.Visit(p.compilationUnit, null);
- } else if (!errorMode) {
- Console.WriteLine ("errors in {0}:", file.Name);
+ }
+
+ if (p.Errors.count == 0 && errorMode) {
+ Console.WriteLine ("no errors in {0}", file.Name);
+ } else if (p.Errors.count > 0 && !errorMode) {
+ Console.WriteLine ("errors in {0}", file.Name);
foreach (ErrorInfo error in p.Errors.ErrorInformation)
Console.WriteLine (error.ToString ());
}
Modified: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/tests/static-class-2.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/tests/static-class-2.cs 2005-03-26 20:05:21 UTC (rev 2395)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/tests/static-class-2.cs 2005-03-26 20:44:14 UTC (rev 2396)
@@ -1,8 +1,29 @@
static class Foo
{
+ static Foo ()
+ {
+ }
+
static void Main ()
{
}
+ static void Abc ()
+ {
+ }
+
+ static int Zxy {
+ get { return 0;}
+ }
+
const int Bar = 0;
+ static readonly string def = "";
+
+ struct Baz
+ {
+ }
+
+ class InternalFoo
+ {
+ }
}
More information about the Monodevelop-patches-list
mailing list