changeset 625:ec5f4198256b

updated <class>.ofsettof tests Ben Hinkle <ben.hinkle@gmail.com> 2005-07-04 news:dac0ps$1hh4$1@digitaldaemon.com
author thomask
date Sat, 13 Aug 2005 20:24:18 +0000
parents 07fab02ed0d2
children a57ea0ea4615
files nocompile/o/offsetof_02.d nocompile/offsetof_06.d nocompile/offsetof_74.d nocompile/offsetof_75.d run/o/offsetof_79.d run/offsetof_02.d
diffstat 6 files changed, 42 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/o/offsetof_02.d	Sat Aug 13 20:24:18 2005 +0000
@@ -0,0 +1,22 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// __DSTRESS_ELINE__ 17
+
+module dstress.run.offsetof_02;
+
+class MyClass{
+	int a;
+	int b;	
+}
+
+int main(){
+	MyClass c;
+
+	assert(c.a.offsetof >= 0);
+	assert(c.b.offsetof >= 0);
+	assert(c.a.offsetof != c.b.offsetof);
+
+	return 0;
+}
--- a/nocompile/offsetof_06.d	Sat Aug 13 20:02:23 2005 +0000
+++ b/nocompile/offsetof_06.d	Sat Aug 13 20:24:18 2005 +0000
@@ -18,7 +18,7 @@
 int main(){
 	MyClass o = new MyClass();
 
-	assert(o.test.offsetof >= 0);
+	assert(MyClass.test.offsetof >= 0);
 
 	return 0;
 }
--- a/nocompile/offsetof_74.d	Sat Aug 13 20:02:23 2005 +0000
+++ b/nocompile/offsetof_74.d	Sat Aug 13 20:24:18 2005 +0000
@@ -11,5 +11,5 @@
 module dstress.nocompile.offsetof_74;
 
 class A{
-	size_t alignof;
+	size_t offsetof;
 }
--- a/nocompile/offsetof_75.d	Sat Aug 13 20:02:23 2005 +0000
+++ b/nocompile/offsetof_75.d	Sat Aug 13 20:24:18 2005 +0000
@@ -11,7 +11,7 @@
 module dstress.nocompile.offsetof_75;
 
 class A{
-	static size_t alignof(){
+	static size_t offsetof(){
 		return 0;
 	}
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/o/offsetof_79.d	Sat Aug 13 20:24:18 2005 +0000
@@ -0,0 +1,17 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+module dstress.run.o.offsetof_79;
+
+class MyClass{
+	int a;
+}
+
+int main(){
+	MyClass o = new MyClass();
+
+	assert(MyClass.test.offsetof >= 0);
+
+	return 0;
+}
--- a/run/offsetof_02.d	Sat Aug 13 20:02:23 2005 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-// $HeadURL$
-// $Date$
-// $Author$
-
-module dstress.run.offsetof_02;
-
-class MyClass{
-	int a;
-	int b;	
-}
-
-int main(){
-	MyClass c;
-
-	assert(c.a.offsetof >= 0);
-	assert(c.b.offsetof >= 0);
-	assert(c.a.offsetof != c.b.offsetof);
-
-	return 0;
-}