check that init doesn't change the value of the queried var
author |
thomask |
date |
Fri, 15 Apr 2005 09:01:17 +0000 |
parents |
db4b6169a99d |
children |
6a553efddc73 |
files |
run/init_04.d run/init_05.d |
diffstat |
2 files changed, 24 insertions(+), 0 deletions(-)
[+]
|
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/run/init_04.d Fri Apr 15 09:01:17 2005 +0000
@@ -0,0 +1,12 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+module dstress.run.init_04;
+
+int main(){
+ int i=2;
+ assert(int.init==i.init);
+ assert(i==2);
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/run/init_05.d Fri Apr 15 09:01:17 2005 +0000
@@ -0,0 +1,12 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+module dstress.run.init_05;
+
+int main(){
+ float i=2f;
+ assert(float.init==i.init);
+ assert(i==2f);
+ return 0;
+}