Mercurial > projects > ldc
annotate tests/mini/arrays4.d @ 1172:b3887714b735
Small cleanup: remove mars.h #include
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 29 Mar 2009 16:47:19 +0200 |
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 } |