Mercurial > projects > ldc
annotate tests/mini/arrays4.d @ 925:79e3d33e6d6e
Added X86-64 versioning
author | wilsonk@ubuntu |
---|---|
date | Tue, 03 Feb 2009 12:33:21 -0700 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
36
c0967c4b2a74
[svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff
changeset
|
1 module arrays4; |
175
c44e6a711885
[svn r191] Fixed: array literals did not support all type/storage combinations.
lindquist
parents:
40
diff
changeset
|
2 |
36
c0967c4b2a74
[svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff
changeset
|
3 void main() |
c0967c4b2a74
[svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff
changeset
|
4 { |
40 | 5 int[] arr; |
6 arr ~= 3; | |
7 assert(arr.length == 1); | |
8 assert(arr[0] == 3); | |
9 arr ~= 5; | |
10 assert(arr.length == 2); | |
11 assert(arr[0] == 3); | |
12 assert(arr[1] == 5); | |
36
c0967c4b2a74
[svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff
changeset
|
13 } |