mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 21:03:14 +01:00
[svn r57] Added most basic TypeInfo (rebuild lphobos).
Fixed some SymOffExp bugs. Added another typeinfo test case.
This commit is contained in:
14
test/typeinfo2.d
Normal file
14
test/typeinfo2.d
Normal file
@@ -0,0 +1,14 @@
|
||||
module typeinfo2;
|
||||
|
||||
void main()
|
||||
{
|
||||
auto ti = typeid(float);
|
||||
float f = 2.5;
|
||||
hash_t fh = ti.getHash(&f);
|
||||
assert(ti.next is null);
|
||||
float g = 4.0;
|
||||
ti.swap(&f,&g);
|
||||
assert(f == 4.0 && g == 2.5);
|
||||
assert(fh == *cast(uint*)(&g));
|
||||
assert(!ti.flags);
|
||||
}
|
||||
Reference in New Issue
Block a user