changeset 682:8a97cee4e7a0

David L. Davis <SpottedTiger@yahoo.com> 2005-09-22 news:dgup0c$1j47$1@digitaldaemon.com
author thomask
date Sun, 25 Sep 2005 06:31:54 +0000
parents be27bc9d0d28
children 3924ae0cb2ef
files run/v/variadic_argument_07_A.d run/v/variadic_argument_07_B.d run/v/variadic_argument_07_C.d run/v/variadic_argument_07_D.d
diffstat 4 files changed, 136 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/v/variadic_argument_07_A.d	Sun Sep 25 06:31:54 2005 +0000
@@ -0,0 +1,31 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	David L. Davis <SpottedTiger@yahoo.com>
+// @date@	2005-09-22
+// @uri@	news:dgup0c$1j47$1@digitaldaemon.com
+
+module dstress.run.v.variadic_argument_07_A;
+
+int counter;
+
+void test(char[] s){
+	assert(s=="string");
+	counter++;
+}
+
+int main(){
+	assert(counter==0);
+	
+	test("string");
+	assert(counter==1);
+	
+	test(cast(char[])"string");
+	assert(counter==2);
+	
+	test("string"c);
+	assert(counter==3);
+	
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/v/variadic_argument_07_B.d	Sun Sep 25 06:31:54 2005 +0000
@@ -0,0 +1,35 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	David L. Davis <SpottedTiger@yahoo.com>
+// @date@	2005-09-22
+// @uri@	news:dgup0c$1j47$1@digitaldaemon.com
+
+module dstress.run.v.variadic_argument_07_B;
+
+int counter;
+
+void test(char[] s){
+	assert(s=="string");
+	counter++;
+}
+
+void test(...){
+	assert(0);
+}
+
+int main(){
+	assert(counter==0);
+	
+	test("string");
+	assert(counter==1);
+	
+	test(cast(char[])"string");
+	assert(counter==2);
+	
+	test("string"c);
+	assert(counter==3);
+	
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/v/variadic_argument_07_C.d	Sun Sep 25 06:31:54 2005 +0000
@@ -0,0 +1,35 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	David L. Davis <SpottedTiger@yahoo.com>
+// @date@	2005-09-22
+// @uri@	news:dgup0c$1j47$1@digitaldaemon.com
+
+module dstress.run.v.variadic_argument_07_C;
+
+int counter;
+
+void test(wchar[] s){
+	assert(s=="string");
+	counter++;
+}
+
+void test(...){
+	assert(0);
+}
+
+int main(){
+	assert(counter==0);
+	
+	test("string");
+	assert(counter==1);
+	
+	test(cast(wchar[])"string");
+	assert(counter==2);
+	
+	test("string"w);
+	assert(counter==3);
+	
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/v/variadic_argument_07_D.d	Sun Sep 25 06:31:54 2005 +0000
@@ -0,0 +1,35 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	David L. Davis <SpottedTiger@yahoo.com>
+// @date@	2005-09-22
+// @uri@	news:dgup0c$1j47$1@digitaldaemon.com
+
+module dstress.run.v.variadic_argument_07_D;
+
+int counter;
+
+void test(dchar[] s){
+	assert(s=="string");
+	counter++;
+}
+
+void test(...){
+	assert(0);
+}
+
+int main(){
+	assert(counter==0);
+	
+	test("string");
+	assert(counter==1);
+	
+	test(cast(dchar[])"string");
+	assert(counter==2);
+	
+	test("string"d);
+	assert(counter==3);
+	
+	return 0;
+}