ts_DataHeader.cpp
Go to the documentation of this file.
00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
00002 
00003 // -- BEGIN LICENSE BLOCK ----------------------------------------------
00004 // This file is part of FZIs ic_workspace.
00005 //
00006 // This program is free software licensed under the LGPL
00007 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
00008 // You can find a copy of this license in LICENSE folder in the top
00009 // directory of the source code.
00010 //
00011 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
00012 //
00013 // -- END LICENSE BLOCK ------------------------------------------------
00014 
00015 //----------------------------------------------------------------------
00022 //----------------------------------------------------------------------
00023 #include <icl_core/DataHeader.h>
00024 
00025 #include <icl_core/BaseTypes.h>
00026 
00027 #include <boost/test/unit_test.hpp>
00028 #include <boost/mpl/list.hpp>
00029 
00030 
00031 using icl_core::DataHeader;
00032 using icl_core::Stamped;
00033 using icl_core::StampedBase;
00034 
00035 BOOST_AUTO_TEST_SUITE(ts_DataHeader)
00036 
00037 typedef boost::mpl::list<char, short, uint32_t, int, long, float, double> TestTypes;
00038 
00039 BOOST_AUTO_TEST_CASE_TEMPLATE(DataHeaderCapacity, T, TestTypes)
00040 {
00041 
00042   {
00043     boost::shared_ptr< Stamped<uint32_t> > test_data(new Stamped<uint32_t>);
00044     boost::shared_ptr<StampedBase> test2 = test_data;
00045     boost::dynamic_pointer_cast< Stamped<uint32_t> >(test2);
00046     Stamped<uint32_t>::Ptr test3 = boost::dynamic_pointer_cast<Stamped<uint32_t> >(test2);
00047   }
00048 
00049   {
00050     typename Stamped<T>::Ptr test_data(new Stamped<T>);
00051     StampedBase::Ptr test2 = test_data;
00052     typename Stamped<T>::Ptr test3 = boost::dynamic_pointer_cast<Stamped<T> >(test2);
00053   }
00054 
00055 }
00056 
00057 BOOST_AUTO_TEST_SUITE_END()


fzi_icl_core
Author(s):
autogenerated on Tue Aug 8 2017 02:28:04