#include "boost/test/unit_test.hpp"
#include <string>
#include "canvas/Persistency/Common/detail/maybeCastObj.h"
 
Go to the source code of this file.
      
        
          | #define BOOST_TEST_MODULE   (Tests of maybeCastObj interface) | 
        
      
 
 
      
        
          | BOOST_AUTO_TEST_CASE  | 
          ( | 
          identical_types  | 
           | ) | 
           | 
        
      
 
Definition at line 74 of file maybeCastObj_t.cc.
BOOST_TEST_REQUIRE(static_cast< bool >(inFile))
 
 
 
 
      
        
          | BOOST_AUTO_TEST_CASE  | 
          ( | 
          mismatched_types  | 
           | ) | 
           | 
        
      
 
Definition at line 88 of file maybeCastObj_t.cc.
BOOST_TEST_REQUIRE(static_cast< bool >(inFile))
 
 
 
 
      
        
          | BOOST_AUTO_TEST_CASE  | 
          ( | 
          user_types  | 
           | ) | 
           | 
        
      
 
Definition at line 101 of file maybeCastObj_t.cc.
  115     (!runUpcastAllowed<MCConcreteVirtual_B, MCConcreteVirtual_A>()));
   119     (runUpcastAllowed<MCConcreteVirtual_C, MCConcreteVirtual_B>()));
 BOOST_TEST_REQUIRE(static_cast< bool >(inFile))
 
 
 
 
      
        
          | BOOST_AUTO_TEST_CASE  | 
          ( | 
          user_type_variables  | 
           | ) | 
           | 
        
      
 
Definition at line 127 of file maybeCastObj_t.cc.
  130   MCConcrete actualConcrete{};
   131   MCBase& refToBase = actualConcrete;
   136   MCConcreteVirtual_A actualConcreteVirtual{};
   137   MCBaseVirtual& refToBaseVirtual = actualConcreteVirtual;
   139                                                  typeid(MCConcreteVirtual_A))));
   141     typeid(refToBaseVirtual), 
typeid(MCConcreteVirtual_B))));
 BOOST_TEST_REQUIRE(static_cast< bool >(inFile))
 
bool upcastAllowed(std::type_info const &tiFrom, std::type_info const &tiTo)