First public contribution.
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Name : dyn_cast_exe.cpp
15 // Part of : standard c++ tests.
20 #include "test_decls.h"
24 printf("\n\nDynamic cast test...\n\n");
25 DynamicCastTest *aPtr = DynamicCastTest ::Instance();
26 printf("Ptr to object across dll boundary 0x%x\n",aPtr);
29 if(dynamic_cast< DynamicCastTest_DerivedClass*>(aPtr)){
30 printf("dynamic_cast successful\n");
31 CPP_TESTS_ASSERT_ALLWAYS(1);
35 CPP_TESTS_ASSERT_ALLWAYS(0);
36 return 1; // -> Even though the type of aPtr is DynamicCastTest*, dynamic_cast fails