changeset 189:e0bcd344aa2b

extended break and switch tests
author thomask
date Thu, 09 Dec 2004 07:44:29 +0000
parents 40336fe41235
children f29443c7054c
files nocompile/break_06.d nocompile/break_07.d nocompile/switch_16.d run/break_03.d run/break_04.d run/break_05.d todo.txt
diffstat 7 files changed, 111 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/break_06.d	Thu Dec 09 07:44:29 2004 +0000
@@ -0,0 +1,23 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+module dstress.nocompile.break_06;
+
+int main(){
+	int i=1;
+outer:	switch(i){
+		case 1:
+inner:			switch(i){
+				case 1:
+					break blah;
+				default:
+					assert(0);
+			}
+		default:
+			assert(0);
+	}
+	return 0;
+blah:
+	assert(0);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/break_07.d	Thu Dec 09 07:44:29 2004 +0000
@@ -0,0 +1,10 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+module dstress.nocompile.break_07;
+
+int main(){
+	break;
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/switch_16.d	Thu Dec 09 07:44:29 2004 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+module dstress.nocompile.switch_16;
+
+int main(){
+	int i;
+	switch(i){
+		case 3:
+			return 0;
+		default:
+			assert(0);
+		default:
+			assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/break_03.d	Thu Dec 09 07:44:29 2004 +0000
@@ -0,0 +1,16 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+module dstress.run.break_03;
+
+int main(){
+	int i=1;
+outer:	switch(i){
+		case 1:
+			break outer;
+		default:
+			assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/break_04.d	Thu Dec 09 07:44:29 2004 +0000
@@ -0,0 +1,21 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+module dstress.run.break_04;
+
+int main(){
+	int i=1;
+outer:	switch(i){
+		case 1:
+inner:			switch(i){
+				case 1:
+					break outer;
+				default:
+					assert(0);
+			}
+		default:
+			assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/break_05.d	Thu Dec 09 07:44:29 2004 +0000
@@ -0,0 +1,22 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+module dstress.run.break_05;
+
+int main(){
+	int i=1;
+outer:	switch(i){
+		case 1:
+inner:			switch(i){
+				case 1:
+					break inner;
+				default:
+					assert(0);
+			}
+			return 0;
+		default:
+			assert(0);
+	}
+	assert(0);
+}
--- a/todo.txt	Thu Dec 09 07:43:49 2004 +0000
+++ b/todo.txt	Thu Dec 09 07:44:29 2004 +0000
@@ -12,6 +12,7 @@
 
 Test cases:
 * keyword: asm
+* keyword: break (intervening finally clauses; mutexes)
 * keyword: in out body
 * keyword: cent
 * keyword: cdouble