Path: blob/master/test/hotspot/gtest/metaprogramming/test_removeExtent.cpp
41145 views
/*1* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#include "precompiled.hpp"25#include "memory/allocation.hpp"26#include "metaprogramming/removeExtent.hpp"27#include "metaprogramming/isSame.hpp"28#include "utilities/debug.hpp"2930class RemoveExtentTest {31class A: AllStatic {};3233typedef A* Aptr;34typedef A Aarr[];35typedef A Aarr10[10];36typedef const A cA;37typedef const A* cAptr;38typedef const A cAarr[];39typedef const A cAarr10[10];4041typedef RemoveExtent<Aptr>::type ra_Aptr;42static const bool ra_Aptr_is_Aptr = IsSame<ra_Aptr, Aptr>::value;43STATIC_ASSERT(ra_Aptr_is_Aptr);4445typedef RemoveExtent<Aarr>::type ra_Aarr;46static const bool ra_Aarr_is_A = IsSame<ra_Aarr, A>::value;47STATIC_ASSERT(ra_Aarr_is_A);4849typedef RemoveExtent<Aarr10>::type ra_Aarr10;50static const bool ra_Aarr10_is_A = IsSame<ra_Aarr10, A>::value;51STATIC_ASSERT(ra_Aarr10_is_A);5253typedef RemoveExtent<cAptr>::type ra_cAptr;54static const bool ra_cAptr_is_cAptr = IsSame<ra_cAptr, cAptr>::value;55STATIC_ASSERT(ra_cAptr_is_cAptr);5657typedef RemoveExtent<cAarr>::type ra_cAarr;58static const bool ra_cAarr_is_cA = IsSame<ra_cAarr, cA>::value;59STATIC_ASSERT(ra_cAarr_is_cA);6061typedef RemoveExtent<cAarr10>::type ra_cAarr10;62static const bool ra_cAarr10_is_cA = IsSame<ra_cAarr10, cA>::value;63STATIC_ASSERT(ra_cAarr10_is_cA);64};656667