Mercurial > projects > ldc
comparison test/moduleinfo2.d @ 273:25fa34e899e9 trunk
[svn r294] Fixed some more of the old tests.
author | lindquist |
---|---|
date | Wed, 18 Jun 2008 23:29:14 +0200 |
parents | d9d5d59873d8 |
children |
comparison
equal
deleted
inserted
replaced
272:94ef6d63f7bb | 273:25fa34e899e9 |
---|---|
2 | 2 |
3 extern(C) int printf(char*, ...); | 3 extern(C) int printf(char*, ...); |
4 | 4 |
5 void main() | 5 void main() |
6 { | 6 { |
7 ModuleInfo[] mi = ModuleInfo.modules(); | 7 printf("listing modules:\n"); |
8 printf("listing %u modules:\n"); | 8 foreach(m; ModuleInfo) |
9 foreach(m; mi) | |
10 { | 9 { |
11 printf(" %s\n", m.name.length, m.name.ptr); | 10 printf(" %.*s\n", m.name.length, m.name.ptr); |
12 } | 11 } |
13 assert(mi.length > 50); | |
14 } | 12 } |