ts_DataHeader.cpp
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // This file is part of FZIs ic_workspace.
5 //
6 // This program is free software licensed under the LGPL
7 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8 // You can find a copy of this license in LICENSE folder in the top
9 // directory of the source code.
10 //
11 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
12 //
13 // -- END LICENSE BLOCK ------------------------------------------------
14 
15 //----------------------------------------------------------------------
22 //----------------------------------------------------------------------
23 #include <icl_core/DataHeader.h>
24 
25 #include <icl_core/BaseTypes.h>
26 
27 #include <boost/test/unit_test.hpp>
28 #include <boost/mpl/list.hpp>
29 
30 
32 using icl_core::Stamped;
34 
35 BOOST_AUTO_TEST_SUITE(ts_DataHeader)
36 
37 typedef boost::mpl::list<char, short, uint32_t, int, long, float, double> TestTypes;
38 
39 BOOST_AUTO_TEST_CASE_TEMPLATE(DataHeaderCapacity, T, TestTypes)
40 {
41 
42  {
43  boost::shared_ptr< Stamped<uint32_t> > test_data(new Stamped<uint32_t>);
44  boost::shared_ptr<StampedBase> test2 = test_data;
45  boost::dynamic_pointer_cast< Stamped<uint32_t> >(test2);
46  Stamped<uint32_t>::Ptr test3 = boost::dynamic_pointer_cast<Stamped<uint32_t> >(test2);
47  }
48 
49  {
50  typename Stamped<T>::Ptr test_data(new Stamped<T>);
51  StampedBase::Ptr test2 = test_data;
52  typename Stamped<T>::Ptr test3 = boost::dynamic_pointer_cast<Stamped<T> >(test2);
53  }
54 
55 }
56 
57 BOOST_AUTO_TEST_SUITE_END()
unsigned int uint32_t
Definition: msvc_stdint.h:93
boost::mpl::list< char, short, uint32_t, int, long, float, double > TestTypes
BOOST_AUTO_TEST_CASE_TEMPLATE(DataHeaderCapacity, T, TestTypes)
Contains Interface base classes and base types.


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:58