changeset 1251:b20a245f2238

[Issue 653] New: AAs are slightly broken Mitja Slenc <mslenc@gmail.com> 2006-12-05 news:bug-653-3@http.d.puremagic.com/issues/
author thomask
date Wed, 06 Dec 2006 14:21:13 +0000
parents 5f46d690a3aa
children e8cc5e77c457
files run/a/associative_array_20_A.d
diffstat 1 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/a/associative_array_20_A.d	Wed Dec 06 14:21:13 2006 +0000
@@ -0,0 +1,31 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Mitja Slenc <mslenc@gmail.com>
+// @date@	2006-12-05
+// @uri@	news:bug-653-3@http.d.puremagic.com/issues/
+// @desc@	[Issue 653] New: AAs are slightly broken
+
+module dstress.run.a.associative_array_20_A;
+
+int main() {
+        int[uint] aa;
+
+        aa[1236448822] = 0;
+        aa[2716102924] = 1;
+        aa[ 315901071] = 2;
+
+        aa.remove(1236448822);
+
+	int* x = 2716102924 in aa;
+	if(!x){
+		assert(0);
+	}
+	if(*x != 1){
+		assert(0);
+	}
+
+	return 0;
+}
+