annotate run/typeid_71.d @ 334:c1ca2f37362b

added TypeInfo.toString checks to detect 'cheating'
author thomask
date Fri, 18 Mar 2005 11:35:53 +0000
parents f4e9069c7993
children 111c6744074d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
133
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
1 /* $HeadURL$
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
2 * $Date$
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
3 * $Author$
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
4 */
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
5
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
6 module dstress.run.typeid_71;
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
7
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
8 struct MyStruct{
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
9 int dummy;
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
10 }
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
11
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
12 int main(){
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
13 TypeInfo ti = typeid(MyStruct[]);
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
14 assert(!(ti is null));
334
c1ca2f37362b added TypeInfo.toString checks to detect 'cheating'
thomask
parents: 133
diff changeset
15 assert(ti.toString()=="MyStruct[]");
133
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
16 return 0;
f4e9069c7993 extended typeid/TypeInfo tests
thomask
parents:
diff changeset
17 }