changeset 159:a2d9121d6dff

Added some tests for constructor and new.
author Anders Johnsen <skabet@gmail.com>
date Tue, 22 Jul 2008 00:34:49 +0200
parents 57b0b4464a0b
children 6cb2f4201e2a
files tests/parser/for_2.d tests/parser/new_1.d tests/parser/this_1.d
diffstat 3 files changed, 40 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/parser/for_2.d	Tue Jul 22 00:34:49 2008 +0200
@@ -0,0 +1,10 @@
+
+
+int main()
+{
+    for( ; ; ) 
+    {
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/parser/new_1.d	Tue Jul 22 00:34:49 2008 +0200
@@ -0,0 +1,22 @@
+
+class A
+{
+    this(long y)
+    {
+    }
+
+    this(int y)
+    {
+    }
+}
+
+struct B
+{
+}
+
+void main()
+{
+    B b;
+    long x;
+    A a = new A(b);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/parser/this_1.d	Tue Jul 22 00:34:49 2008 +0200
@@ -0,0 +1,8 @@
+
+class A
+{
+    this()
+    {
+    }
+}
+