changeset 915:20545aed98f2

Victor Nakoryakov <Victor_member@pathlink.com> 2006-03-11 news:duukb8$2vvd$1@digitaldaemon.com
author thomask
date Wed, 15 Mar 2006 20:46:11 +0000
parents 7e37cc332431
children 3753adcf5c3a
files run/t/template_31_A.d run/t/template_31_B.d run/t/template_31_C.d run/t/template_31_D.d
diffstat 4 files changed, 140 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/template_31_A.d	Wed Mar 15 20:46:11 2006 +0000
@@ -0,0 +1,35 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Victor Nakoryakov <Victor_member@pathlink.com>
+// @date@	2006-03-11
+// @uri@	news:duukb8$2vvd$1@digitaldaemon.com
+
+module dstress.run.t.template_31_A;
+
+template C(T, T x){
+	T C(){
+		return x;
+	}
+}
+
+int main(){
+	const int a = 3;
+
+	auto b = C!(typeof(a), a)();
+
+	if(!is(typeof(a) : typeof(b))){
+		assert(0);
+	}
+
+	if(!is(typeof(b) : typeof(a))){
+		assert(0);
+	}
+
+	if(a != b){
+		assert(0);
+	}
+	
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/template_31_B.d	Wed Mar 15 20:46:11 2006 +0000
@@ -0,0 +1,35 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Victor Nakoryakov <Victor_member@pathlink.com>
+// @date@	2006-03-11
+// @uri@	news:duukb8$2vvd$1@digitaldaemon.com
+
+module dstress.run.t.template_31_B;
+
+template C(int x){
+	int C(){
+		return x;
+	}
+}
+
+int main(){
+	const int a = 3;
+
+	auto b = C!(a)();
+
+	if(!is(typeof(a) : typeof(b))){
+		assert(0);
+	}
+
+	if(!is(typeof(b) : typeof(a))){
+		assert(0);
+	}
+
+	if(a != b){
+		assert(0);
+	}
+	
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/template_31_C.d	Wed Mar 15 20:46:11 2006 +0000
@@ -0,0 +1,35 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Victor Nakoryakov <Victor_member@pathlink.com>
+// @date@	2006-03-11
+// @uri@	news:duukb8$2vvd$1@digitaldaemon.com
+
+module dstress.run.t.template_31_C;
+
+template C(T x, T){
+	T C(){
+		return x;
+	}
+}
+
+int main(){
+	const int a = 3;
+
+	auto b = C!(a, typeof(a))();
+
+	if(!is(typeof(a) : typeof(b))){
+		assert(0);
+	}
+
+	if(!is(typeof(b) : typeof(a))){
+		assert(0);
+	}
+
+	if(a != b){
+		assert(0);
+	}
+	
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/template_31_D.d	Wed Mar 15 20:46:11 2006 +0000
@@ -0,0 +1,35 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Victor Nakoryakov <Victor_member@pathlink.com>
+// @date@	2006-03-11
+// @uri@	news:duukb8$2vvd$1@digitaldaemon.com
+
+module dstress.run.t.template_31_D;
+
+template C(int x, T){
+	T C(){
+		return x;
+	}
+}
+
+int main(){
+	const int a = 3;
+
+	auto b = C!(a, typeof(a))();
+
+	if(!is(typeof(a) : typeof(b))){
+		assert(0);
+	}
+
+	if(!is(typeof(b) : typeof(a))){
+		assert(0);
+	}
+
+	if(a != b){
+		assert(0);
+	}
+	
+	return 0;
+}