Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / geometry / test / core / tag.cpp
index d3bbc4b..f67c58d 100644 (file)
@@ -3,6 +3,11 @@
 
 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
 
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014 Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
 // Use, modification and distribution is subject to the Boost Software License,
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
@@ -10,6 +15,8 @@
 
 #include <geometry_test_common.hpp>
 
+#include <boost/type_traits/is_same.hpp>
+
 #include <boost/geometry/core/tag.hpp>
 
 #include <boost/geometry/geometries/geometries.hpp>
@@ -34,6 +41,9 @@ void test_geometry()
 {
     BOOST_CHECK_EQUAL(typeid(typename bg::tag<G>::type).name(),
         typeid(Expected).name());
+
+    static const bool is_same = boost::is_same<typename bg::tag<G>::type, Expected>::value;
+    BOOST_CHECK(is_same);
 }
 
 template <typename P, size_t D>
@@ -41,7 +51,12 @@ void test_all()
 {
     test_geometry<P, bg::point_tag>();
     test_geometry<P const, bg::point_tag>();
+    test_geometry<P*, bg::point_tag>();
+    test_geometry<P&, bg::point_tag>();
+    test_geometry<P*&, bg::point_tag>();
+    test_geometry<const P *, bg::point_tag>();
     test_geometry<bg::model::linestring<P> , bg::linestring_tag>();
+    test_geometry<bg::model::linestring<P> *&, bg::linestring_tag>();
     test_geometry<bg::model::ring<P> , bg::ring_tag>();
     test_geometry<bg::model::polygon<P> , bg::polygon_tag>();
     test_geometry<bg::model::box<P> , bg::box_tag>();