[svn] r7541: nemerle/trunk/ncc/testsuite/positive: async.n
ctor-default-param.n
divan
svnadmin at nemerle.org
Sun Mar 18 11:39:12 CET 2007
Log:
1) Add test for constructor with default parameter.
2) Improve async test (prevent it from running too long/forever).
Author: divan
Date: Sun Mar 18 11:39:07 2007
New Revision: 7541
Added:
nemerle/trunk/ncc/testsuite/positive/ctor-default-param.n
Modified:
nemerle/trunk/ncc/testsuite/positive/async.n
Modified: nemerle/trunk/ncc/testsuite/positive/async.n
==============================================================================
--- nemerle/trunk/ncc/testsuite/positive/async.n (original)
+++ nemerle/trunk/ncc/testsuite/positive/async.n Sun Mar 18 11:39:07 2007
@@ -10,7 +10,8 @@
[Async]
public M () : void
{
- while (i == 0) ();
+ while (i == 0)
+ System.Threading.Thread.Sleep (100);
printf ("OK\n")
}
@@ -31,7 +32,8 @@
async
{
- while (x == 0) ();
+ while (x == 0)
+ System.Threading.Thread.Sleep (100);
assert (x == 1);
x = 2
}
@@ -42,7 +44,8 @@
}
x = 1;
- while (x == 1) ();
+ while (x == 1)
+ System.Threading.Thread.Sleep (100);
assert (x == 2);
printf ("%d\n", x);
Added: nemerle/trunk/ncc/testsuite/positive/ctor-default-param.n
==============================================================================
--- (empty file)
+++ nemerle/trunk/ncc/testsuite/positive/ctor-default-param.n Sun Mar 18 11:39:07 2007
@@ -0,0 +1,15 @@
+class A{
+ public this (x : int = 3) {
+ System.Console.WriteLine (x);
+ }
+ public static Main () : void {
+ _ = A();
+ _ = A(1);
+ }
+}
+/*
+BEGIN-OUTPUT
+3
+1
+END-OUTPUT
+*/
More information about the svn
mailing list