1262617Sdelphij// 2004-12-03 Paolo Carlini <pcarlini@suse.de> 2262685Sdelphij// 3262617Sdelphij// Copyright (C) 2004-2015 Free Software Foundation, Inc. 4262617Sdelphij// 5262617Sdelphij// This file is part of the GNU ISO C++ Library. This library is free 6262617Sdelphij// software; you can redistribute it and/or modify it under the 7262617Sdelphij// terms of the GNU General Public License as published by the 8262617Sdelphij// Free Software Foundation; either version 3, or (at your option) 9262617Sdelphij// any later version. 10262617Sdelphij// 11262617Sdelphij// This library is distributed in the hope that it will be useful, 12262617Sdelphij// but WITHOUT ANY WARRANTY; without even the implied warranty of 13262617Sdelphij// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14262617Sdelphij// GNU General Public License for more details. 15262617Sdelphij// 16262617Sdelphij// You should have received a copy of the GNU General Public License along 17262617Sdelphij// with this library; see the file COPYING3. If not see 18262617Sdelphij// <http://www.gnu.org/licenses/>. 19262617Sdelphij 20262617Sdelphij// 4.5.1 Primary type categories 21262617Sdelphij 22262617Sdelphij#include <tr1/type_traits> 23262617Sdelphij#include <testsuite_hooks.h> 24262617Sdelphij#include <testsuite_tr1.h> 25262617Sdelphij 26262617Sdelphijvoid test01() 27262617Sdelphij{ 28262617Sdelphij bool test __attribute__((unused)) = true; 29262617Sdelphij using std::tr1::is_floating_point; 30262685Sdelphij using namespace __gnu_test; 31262617Sdelphij 32262617Sdelphij VERIFY( (test_category<is_floating_point, void>(false)) ); 33262617Sdelphij VERIFY( (test_category<is_floating_point, char>(false)) ); 34262617Sdelphij VERIFY( (test_category<is_floating_point, signed char>(false)) ); 35262617Sdelphij VERIFY( (test_category<is_floating_point, unsigned char>(false)) ); 36262617Sdelphij#ifdef _GLIBCXX_USE_WCHAR_T 37262617Sdelphij VERIFY( (test_category<is_floating_point, wchar_t>(false)) ); 38262617Sdelphij#endif 39262617Sdelphij VERIFY( (test_category<is_floating_point, short>(false)) ); 40262617Sdelphij VERIFY( (test_category<is_floating_point, unsigned short>(false)) ); 41262617Sdelphij VERIFY( (test_category<is_floating_point, int>(false)) ); 42262617Sdelphij VERIFY( (test_category<is_floating_point, unsigned int>(false)) ); 43262617Sdelphij VERIFY( (test_category<is_floating_point, long>(false)) ); 44262617Sdelphij VERIFY( (test_category<is_floating_point, unsigned long>(false)) ); 45262617Sdelphij VERIFY( (test_category<is_floating_point, long long>(false)) ); 46262617Sdelphij VERIFY( (test_category<is_floating_point, unsigned long long>(false)) ); 47262617Sdelphij 48262617Sdelphij VERIFY( (test_category<is_floating_point, float>(true)) ); 49262617Sdelphij VERIFY( (test_category<is_floating_point, double>(true)) ); 50262617Sdelphij VERIFY( (test_category<is_floating_point, long double>(true)) ); 51262617Sdelphij 52262617Sdelphij // Sanity check. 53262617Sdelphij VERIFY( (test_category<is_floating_point, ClassType>(false)) ); 54262617Sdelphij} 55262617Sdelphij 56262617Sdelphijint main() 57262617Sdelphij{ 58262617Sdelphij test01(); 59262617Sdelphij return 0; 60262617Sdelphij} 61262617Sdelphij