changeset 1454:0c9905dc4158

switch bug BCS <ao@pathlink.com> 2007-03-24 news:ce0a334389688c93c3bbfaa07d6@news.digitalmars.com
author thomask
date Thu, 05 Apr 2007 08:28:05 +0000
parents 684421d327df
children a4dc53fd9f2e
files run/s/switch_24_A.d run/s/switch_24_B.d run/s/switch_24_C.d
diffstat 3 files changed, 96 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/switch_24_A.d	Thu Apr 05 08:28:05 2007 +0000
@@ -0,0 +1,33 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	BCS <ao@pathlink.com>
+// @date@	2007-03-24
+// @uri@	news:ce0a334389688c93c3bbfaa07d6@news.digitalmars.com
+// @desc@	switch bug
+
+module dstress.run.s.switch_24_A;
+
+int main(){
+	int x = 0;
+
+	switch("#!"){
+		case "#!":
+			x++;
+			break;
+		case "\xFF\xFE":
+			assert(0);
+			break;
+		default:
+			assert(0);
+			break;
+	}
+
+	if(1 != x){
+		assert(0);
+	}
+
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/switch_24_B.d	Thu Apr 05 08:28:05 2007 +0000
@@ -0,0 +1,33 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	BCS <ao@pathlink.com>
+// @date@	2007-03-24
+// @uri@	news:ce0a334389688c93c3bbfaa07d6@news.digitalmars.com
+// @desc@	switch bug
+
+module dstress.run.s.switch_24_B;
+
+int main(){
+	int x = 0;
+
+	switch("#!"){
+		case "#!":
+			x++;
+			break;
+		case "\xFF\xFE"c:
+			assert(0);
+			break;
+		default:
+			assert(0);
+			break;
+	}
+
+	if(1 != x){
+		assert(0);
+	}
+
+	return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/s/switch_24_C.d	Thu Apr 05 08:28:05 2007 +0000
@@ -0,0 +1,30 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	BCS <ao@pathlink.com>
+// @date@	2007-03-24
+// @uri@	news:ce0a334389688c93c3bbfaa07d6@news.digitalmars.com
+// @desc@	switch bug
+
+module dstress.run.s.switch_24_C;
+
+int main(){
+	int x = 0;
+
+	switch("#!"){
+		case "#!":
+			x++;
+			break;
+		default:
+			assert(0);
+			break;
+	}
+
+	if(1 != x){
+		assert(0);
+	}
+
+	return 0;
+}
+