Author: martin
Date: 2006-04-05 11:37:27 -0400 (Wed, 05 Apr 2006)
New Revision: 59082

Added:
   trunk/debugger/test/src/TestAbort.cs
   trunk/debugger/test/src/TestBreakpoint.cs
   trunk/debugger/test/src/TestByRef.cs
   trunk/debugger/test/src/TestNull.cs
   trunk/debugger/test/src/TestObject.cs
   trunk/debugger/test/src/TestProperty.cs
   trunk/debugger/test/src/TestRestart.cs
   trunk/debugger/test/src/TestToString.cs
   trunk/debugger/test/testsuite/TestProperty.cs
Removed:
   trunk/debugger/test/TestAbort.cs
   trunk/debugger/test/TestBreakpoint.cs
   trunk/debugger/test/TestByRef.cs
   trunk/debugger/test/TestNull.cs
   trunk/debugger/test/TestObject.cs
   trunk/debugger/test/TestProperty.cs
   trunk/debugger/test/TestRestart.cs
   trunk/debugger/test/TestToString.cs
   trunk/debugger/test/mono-debugger.tests/TestProperty.exp
Modified:
   trunk/debugger/test/Makefile.am
   trunk/debugger/test/src/Makefile.am
Log:
One more test is migrated ....

Modified: trunk/debugger/test/Makefile.am
===================================================================
--- trunk/debugger/test/Makefile.am     2006-04-05 15:31:47 UTC (rev 59081)
+++ trunk/debugger/test/Makefile.am     2006-04-05 15:37:27 UTC (rev 59082)
@@ -5,10 +5,7 @@
 
 noinst_SCRIPTS = \
        TestAssembly.exe TestNamespace.exe TestModule.dll \
-       MultiThread.exe Simple.exe TestException.exe \
-       TestRestart.exe TestNull.exe TestByRef.exe \
-       TestToString.exe TestObject.exe TestProperty.exe TestAbort.exe \
-       TestBreakpoint.exe
+       MultiThread.exe Simple.exe TestException.exe
 
 noinst_LTLIBRARIES=libfoo.la
 
@@ -16,9 +13,7 @@
 
 EXTRA_DIST = \
        TestAssembly.cs TestNamespace.cs TestModule.cs \
-       MultiThread.cs Simple.cs TestException.cs mdb.exp \
-       TestRestart.cs TestNull.cs TestByRef.cs TestToString.cs \
-       TestObject.cs TestProperty.cs TestAbort.cs TestBreakpoint.exe
+       MultiThread.cs Simple.cs TestException.cs mdb.exp
 
 testnativetypes_SOURCES = testnativetypes.c
 

Deleted: trunk/debugger/test/TestAbort.cs
===================================================================
--- trunk/debugger/test/TestAbort.cs    2006-04-05 15:31:47 UTC (rev 59081)
+++ trunk/debugger/test/TestAbort.cs    2006-04-05 15:37:27 UTC (rev 59082)
@@ -1,37 +0,0 @@
-using System;
-using System.Threading;
-
-class X
-{
-       static void Test ()
-       {
-               Thread.CurrentThread.Abort ();
-       }
-
-       static void Hello ()
-       {
-               Console.WriteLine ("Hello World");
-       }
-
-       static int Count = 0;
-
-       static int Hello (int a)
-       {
-               long b = 2 * a;
-               try {
-                       Hello ();
-               } finally {
-                       ++Count;
-                       Console.WriteLine ("Done: {0} {1} {2}", a, b, Count);
-               }
-
-               return 1;
-       }
-
-       static void Main ()
-       {
-               Hello (5);
-               Console.WriteLine (Count);
-               Test ();
-       }
-}

Deleted: trunk/debugger/test/TestBreakpoint.cs
===================================================================
--- trunk/debugger/test/TestBreakpoint.cs       2006-04-05 15:31:47 UTC (rev 
59081)
+++ trunk/debugger/test/TestBreakpoint.cs       2006-04-05 15:37:27 UTC (rev 
59082)
@@ -1,117 +0,0 @@
-using System;
-
-namespace Martin.Baulig
-{
-       using Europe.Germany;
-       using Postcard;
-
-       public class Hello
-       {
-               protected Trier trier;
-
-               public Hello ()
-               {
-                       trier = new Trier ();
-               }
-
-               public static void World (Picture picture)
-               {
-                       Console.WriteLine (picture);
-               }
-
-               public void Test ()
-               {
-                       World (trier.PortaNigra);
-                       World (trier.CityCenter);
-                       Console.WriteLine ("Irish Pub");
-                       World (Trier.RomanBaths);
-               }
-
-               public Trier Trier {
-                       get {
-                               return trier;
-                       }
-               }
-       }
-}
-
-namespace Postcard
-{
-       public abstract class Picture
-       { }
-}
-
-namespace Europe
-{
-       using Postcard;
-
-       public class BeautifulPicture : Picture
-       {
-               public readonly string URL;
-
-               public BeautifulPicture (string url)
-               {
-                       this.URL = url;
-               }
-
-               public override string ToString ()
-               {
-                       return URL;
-               }
-       }
-
-       namespace Germany
-       {
-               public class Trier
-               {
-                       const string WikipediaRoot = 
"http://de.wikipedia.org/wiki/";;
-                       const string PortaNigraURL = 
"Bild:Porta_Nigra_Trier.jpg";
-                       const string CityCenterURL = 
"Bild:Trier_Innenstadt.jpg";
-                       const string RomanBathsURL = 
"Bild:Trier_roman_baths_DSC02378.jpg";
-
-                       public Picture PortaNigra {
-                               get {
-                                       return new BeautifulPicture 
(WikipediaRoot + PortaNigraURL);
-                               }
-                       }
-
-                       public Picture CityCenter {
-                               get {
-                                       return new BeautifulPicture 
(WikipediaRoot + CityCenterURL);
-                               }
-                       }
-
-                       public static Picture RomanBaths {
-                               get {
-                                       return new BeautifulPicture 
(WikipediaRoot + RomanBathsURL);
-                               }
-                       }
-               }
-       }
-}
-
-class X
-{
-       static void Main ()
-       {
-               Martin.Baulig.Hello hello = new Martin.Baulig.Hello ();
-               hello.Test ();
-               Y.Hello ();
-               hello.Test ();
-               Y.Test (hello);
-               Console.WriteLine (hello);
-       }
-}
-
-public class Y
-{
-       public static void Hello ()
-       {
-               Console.WriteLine ("Hello World");
-       }
-
-       public static void Test (Martin.Baulig.Hello hello)
-       {
-               hello.Test ();
-       }
-}

Deleted: trunk/debugger/test/TestByRef.cs
===================================================================
--- trunk/debugger/test/TestByRef.cs    2006-04-05 15:31:47 UTC (rev 59081)
+++ trunk/debugger/test/TestByRef.cs    2006-04-05 15:37:27 UTC (rev 59082)
@@ -1,23 +0,0 @@
-using System;
-
-class X
-{
-       public static void Test (out int foo)
-       {
-               foo = 3;
-               Console.WriteLine (foo);
-       }
-
-       public static unsafe void UnsafeTest (int foo)
-       {
-               int* ptr = &foo;
-               Console.WriteLine (*ptr);
-       }
-
-       static void Main ()
-       {
-               int foo;
-               Test (out foo);
-               UnsafeTest (foo);
-       }
-}

Deleted: trunk/debugger/test/TestNull.cs
===================================================================
--- trunk/debugger/test/TestNull.cs     2006-04-05 15:31:47 UTC (rev 59081)
+++ trunk/debugger/test/TestNull.cs     2006-04-05 15:37:27 UTC (rev 59082)
@@ -1,28 +0,0 @@
-using System;
-
-public class X
-{
-       public readonly long Foo;
-
-       public X (long foo)
-       {
-               this.Foo = foo;
-       }
-
-       public static void Main ()
-       {
-               string hello = null;
-               X x = null;
-               int[] int_array = null;
-               X[] x_array = null;
-               X[] y_array = new X [1];
-               X[] z_array = new X [] { new X (5) };
-
-               Console.WriteLine (hello == null);
-               Console.WriteLine (x == null);
-               Console.WriteLine (int_array == null);
-               Console.WriteLine (x_array == null);
-               Console.WriteLine (y_array == null);
-               Console.WriteLine (z_array == null);
-       }
-}

Deleted: trunk/debugger/test/TestObject.cs
===================================================================
--- trunk/debugger/test/TestObject.cs   2006-04-05 15:31:47 UTC (rev 59081)
+++ trunk/debugger/test/TestObject.cs   2006-04-05 15:37:27 UTC (rev 59082)
@@ -1,49 +0,0 @@
-using System;
-
-public abstract class Foo
-{
-}
-
-public class Bar : Foo
-{
-       public readonly int Data;
-
-       public Bar (int data)
-       {
-               this.Data = data;
-       }
-
-       public void Hello ()
-       { }
-}
-
-public struct Hello
-{
-       public readonly long Data;
-
-       public Hello (long data)
-       {
-               this.Data = data;
-       }
-
-       public override string ToString ()
-       {
-               return String.Format ("0x{0:x}", Data);
-       }
-}
-
-class X
-{
-       static void Main ()
-       {
-               Foo foo = new Bar (81);
-               Hello hello = new Hello (0x12345678);
-               object obj = foo;
-               object boxed = hello;
-               ValueType value = hello;
-               Console.WriteLine (foo);
-               Console.WriteLine (obj);
-               Console.WriteLine (boxed);
-               Console.WriteLine (value);
-       }
-}

Deleted: trunk/debugger/test/TestProperty.cs
===================================================================
--- trunk/debugger/test/TestProperty.cs 2006-04-05 15:31:47 UTC (rev 59081)
+++ trunk/debugger/test/TestProperty.cs 2006-04-05 15:37:27 UTC (rev 59082)
@@ -1,46 +0,0 @@
-using System;
-
-public class A
-{ }
-
-public class B
-{ }
-
-public class C
-{ }
-
-public class D
-{ }
-
-public class Test
-{
-       public A A {
-               get { return new A (); }
-       }
-
-       public B[] B {
-               get {
-                       B[] b = new B [1];
-                       b [0] = new B ();
-                       return b;
-               }
-       }
-
-       public C[,] C {
-               get { return new C [0,0]; }
-       }
-
-       public string Hello (D d)
-       {
-               return d.ToString ();
-       }
-}
-
-class X
-{
-       static void Main ()
-       {
-               Test test = new Test ();
-               Console.WriteLine (test);
-       }
-}

Deleted: trunk/debugger/test/TestRestart.cs
===================================================================
--- trunk/debugger/test/TestRestart.cs  2006-04-05 15:31:47 UTC (rev 59081)
+++ trunk/debugger/test/TestRestart.cs  2006-04-05 15:37:27 UTC (rev 59082)
@@ -1,9 +0,0 @@
-using System;
-
-public class X
-{
-       static void Main ()
-       {
-               Console.WriteLine ("Hello World");
-       }
-}

Deleted: trunk/debugger/test/TestToString.cs
===================================================================
--- trunk/debugger/test/TestToString.cs 2006-04-05 15:31:47 UTC (rev 59081)
+++ trunk/debugger/test/TestToString.cs 2006-04-05 15:37:27 UTC (rev 59082)
@@ -1,89 +0,0 @@
-using System;
-
-public abstract class Foo
-{
-       public override string ToString ()
-       {
-               return "Hello World!";
-       }
-}
-
-public class Bar : Foo
-{
-}
-
-public class B
-{
-       public int a;
-       public long b;
-       public string c;
-
-       public static float Test = 3.14F;
-
-       public float Property {
-               get { return Test; }
-       }
-
-       public B (int a, long b, string c)
-       {
-               this.a = a;
-               this.b = b;
-               this.c = c;
-       }
-
-       public void Foo ()
-       {
-               Console.WriteLine (a);
-               Console.WriteLine (Test);
-       }
-
-       public void Foo (string hello)
-       {
-               Console.WriteLine (hello);
-       }
-}
-
-public class C : B
-{
-       public C (int a, long b, string c)
-               : base (a, b, c)
-       { }
-
-       public override string ToString ()
-       {
-               return String.Format ("C ({0}:{1}:{2})", a, b, c);
-       }
-}
-
-public struct Hello
-{
-       public readonly float PI;
-
-       public Hello (float pi)
-       {
-               this.PI = pi;
-       }
-
-       public override string ToString ()
-       {
-               return "Albert Einstein";
-       }
-}
-
-class X
-{
-       static void Test (Foo foo, Bar bar, Hello hello, B b, C c, B d)
-       { }
-
-       static void Main ()
-       {
-               Foo foo = new Bar ();
-               Bar bar = new Bar ();
-               Hello hello = new Hello (3.1415F);
-               B b = new B (5, 256, "Robbie Williams");
-               C c = new C (5, 256, "Robbie Williams");
-               B bb = (B) c;
-
-               Test (foo, bar, hello, b, c, bb);
-       }
-}

Deleted: trunk/debugger/test/mono-debugger.tests/TestProperty.exp
===================================================================
--- trunk/debugger/test/mono-debugger.tests/TestProperty.exp    2006-04-05 
15:31:47 UTC (rev 59081)
+++ trunk/debugger/test/mono-debugger.tests/TestProperty.exp    2006-04-05 
15:37:27 UTC (rev 59082)
@@ -1,27 +0,0 @@
-#!/usr/bin/expect -f
-#
-
-source $srcdir/mdb.exp
-
-set bpt_main 43
-set bpt_1 44
-set file $srcdir/TestProperty.cs
-
-mdb_start "TestProperty.exe"
-mdb_expect_frame 0 "X.Main()" $file $bpt_main
-mdb_send "break $bpt_1"
-set breakpoint [mdb_expect_breakpoint]
-mdb_send "continue"
-mdb_expect_hit_breakpoint  0 "X.Main()" $breakpoint $file $bpt_1
-
-mdb_send_and_expect "p test.A" "(A) { }"
-mdb_send_and_expect "p test.B" "(B\[\]) \[ { } \]"
-mdb_send_and_expect "p test.C" "(C\[,\]) \[  \]"
-mdb_send_and_expect "p test.Hello (new D ())" "(System.String) \"D\""
-
-mdb_send "continue"
-mdb_expect_line "Test"
-mdb_expect_line "Target exited."
-mdb_expect_prompt
-mdb_send "quit"
-

Modified: trunk/debugger/test/src/Makefile.am
===================================================================
--- trunk/debugger/test/src/Makefile.am 2006-04-05 15:31:47 UTC (rev 59081)
+++ trunk/debugger/test/src/Makefile.am 2006-04-05 15:37:27 UTC (rev 59082)
@@ -2,11 +2,16 @@
 
 noinst_SCRIPTS = \
        TestManagedTypes.exe TestInvocation.exe TestInheritance.exe \
-       TestDelegate.exe TestIndexer.exe TestEnum.exe
+       TestDelegate.exe TestIndexer.exe TestEnum.exe \
+       TestRestart.exe TestNull.exe TestByRef.exe \
+       TestToString.exe TestObject.exe TestProperty.exe TestAbort.exe \
+       TestBreakpoint.exe
 
 EXTRA_DIST = \
        TestManagedTypes.cs TestInvocation.cs TestInheritance.cs \
-       TestDelegate.cs TestIndexer.cs TestEnum.cs
+       TestDelegate.cs TestIndexer.cs TestEnum.cs \
+       TestRestart.cs TestNull.cs TestByRef.cs TestToString.cs \
+       TestObject.cs TestProperty.cs TestAbort.cs TestBreakpoint.exe
 
 %.exe:%.cs
        $(MCS) $(MCS_FLAGS) -out:$@ $<

Copied: trunk/debugger/test/src/TestAbort.cs (from rev 59069, 
trunk/debugger/test/TestAbort.cs)

Copied: trunk/debugger/test/src/TestBreakpoint.cs (from rev 59069, 
trunk/debugger/test/TestBreakpoint.cs)

Copied: trunk/debugger/test/src/TestByRef.cs (from rev 59069, 
trunk/debugger/test/TestByRef.cs)

Copied: trunk/debugger/test/src/TestNull.cs (from rev 59069, 
trunk/debugger/test/TestNull.cs)

Copied: trunk/debugger/test/src/TestObject.cs (from rev 59069, 
trunk/debugger/test/TestObject.cs)

Copied: trunk/debugger/test/src/TestProperty.cs (from rev 59069, 
trunk/debugger/test/TestProperty.cs)

Copied: trunk/debugger/test/src/TestRestart.cs (from rev 59069, 
trunk/debugger/test/TestRestart.cs)

Copied: trunk/debugger/test/src/TestToString.cs (from rev 59069, 
trunk/debugger/test/TestToString.cs)

Added: trunk/debugger/test/testsuite/TestProperty.cs
===================================================================
--- trunk/debugger/test/testsuite/TestProperty.cs       2006-04-05 15:31:47 UTC 
(rev 59081)
+++ trunk/debugger/test/testsuite/TestProperty.cs       2006-04-05 15:37:27 UTC 
(rev 59082)
@@ -0,0 +1,42 @@
+using System;
+using NUnit.Framework;
+
+using Mono.Debugger;
+using Mono.Debugger.Languages;
+using Mono.Debugger.Frontend;
+
+namespace Mono.Debugger.Tests
+{
+       [TestFixture]
+       public class TestProperty : TestSuite
+       {
+               public TestProperty ()
+                       : base ("../test/src/TestProperty.exe")
+               { }
+
+               [Test]
+               public void Main ()
+               {
+                       Process process = Interpreter.Start ();
+                       Assert.IsTrue (process.IsManaged);
+                       Assert.IsTrue (process.MainThread.IsStopped);
+                       Thread thread = process.MainThread;
+
+                       const int line_main = 43;
+                       const int line_main_2 = 44;
+
+                       AssertStopped (thread, "X.Main()", line_main);
+
+                       int bpt_main_2 = AssertBreakpoint (line_main_2.ToString 
());
+                       Execute ("continue");
+                       AssertHitBreakpoint (thread, bpt_main_2, "X.Main()", 
line_main_2);
+
+                       AssertPrint (thread, "test.A", "(A) { }");
+                       AssertPrint (thread, "test.B", "(B[]) [ { } ]");
+                       AssertPrint (thread, "test.C", "(C[,]) [  ]");
+                       AssertPrint (thread, "test.Hello (new D ())", 
"(System.String) \"D\"");
+
+                       Execute ("kill");
+               }
+       }
+}

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to