]>
git.saurik.com Git - apple/dyld.git/blob - unit-tests/test-cases/dynamic_cast-basic/realmain.cxx
3 #include <stdio.h> // fprintf(), NULL
4 #include <stdlib.h> // exit(), EXIT_SUCCESS
6 #include "test.h" // PASS(), FAIL(), XPASS(), XFAIL()
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");
21 PASS("dynamic_cast-basic");