annotate tests/mini/classinfo5.d @ 1520:1a93c3da09ef

Yet another fix for finding llvm's config file. Since llvm-config --includedir sometimes includes the trailing llvm/ and sometimes it doesn't, we just check both directories.
author Christian Kamm <kamm incasoftware de>
date Tue, 30 Jun 2009 22:07:50 +0200
parents 8d46c475842a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
726
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
1 extern(C) int printf(char*, ...);
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
2
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
3 class BaseClass {}
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
4
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
5 void main()
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
6 {
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
7 Object o_cr = BaseClass.classinfo.create();
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
8 Object o_new = new BaseClass;
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
9 printf("CIaddr: %X\n", cast(size_t*)BaseClass.classinfo);
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
10 printf("Create: %X\n", cast(size_t*)o_cr.classinfo);
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
11 printf("New: %X\n", cast(size_t*)o_new.classinfo);
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
12 assert(cast(size_t*)o_cr.classinfo == cast(size_t*)o_new.classinfo);
8d46c475842a Add test for broken ClassInfo.create method. Thanks MrSunshine.
Christian Kamm <kamm incasoftware de>
parents:
diff changeset
13 }