]> git.saurik.com Git - apple/dyld.git/blob - unit-tests/test-cases/dynamic_cast-basic/realmain.cxx
dyld-239.4.tar.gz
[apple/dyld.git] / unit-tests / test-cases / dynamic_cast-basic / realmain.cxx
1
2
3 #include <stdio.h> // fprintf(), NULL
4 #include <stdlib.h> // exit(), EXIT_SUCCESS
5
6 #include "test.h" // PASS(), FAIL(), XPASS(), XFAIL()
7
8 #include "foo.h"
9
10
11 void realmain()
12 {
13 test* t1 = maketestsub();
14 test* t2 = new testsub();
15 test* t3 = new testsubother();
16 testsub* t1a = dynamic_cast<testsub*>(t1);
17 testsubother* t3a = dynamic_cast<testsubother*>(t3);
18 if ( (t1a == NULL) || (t3a == NULL) || !istestsub(t2) )
19 FAIL("dynamic_cast-basic");
20 else
21 PASS("dynamic_cast-basic");
22 }
23
24