From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- .../regex_traits/char/ctor.cc | 48 ++++++++++++++++++++++ .../regex_traits/char/translate_nocase.cc | 41 ++++++++++++++++++ .../regex_traits/char/value.cc | 48 ++++++++++++++++++++++ .../regex_traits/wchar_t/ctor.cc | 48 ++++++++++++++++++++++ .../regex_traits/wchar_t/translate_nocase.cc | 41 ++++++++++++++++++ .../regex_traits/wchar_t/value.cc | 48 ++++++++++++++++++++++ 6 files changed, 274 insertions(+) create mode 100644 libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/ctor.cc create mode 100644 libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/translate_nocase.cc create mode 100644 libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/value.cc create mode 100644 libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/ctor.cc create mode 100644 libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/translate_nocase.cc create mode 100644 libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/value.cc (limited to 'libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits') diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/ctor.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/ctor.cc new file mode 100644 index 000000000..3f7552f55 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/ctor.cc @@ -0,0 +1,48 @@ +// { dg-do link } + +// 2007-03-12 Stephen M. Webb +// +// Copyright (C) 2007, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// tr1 [7.7] class template regex_traits + +#include +#include + +// Tests default constructor of the regex_traits class. There is only the +// default constructor. +void test01() +{ + typedef std::tr1::regex_traits test_type; + + // required default constructor + test_type t; + + // Check for required typedefs + typedef test_type::char_type char_type; + typedef test_type::string_type string_type; + typedef test_type::locale_type locale_type; + typedef test_type::char_class_type char_class_type; +} + +int +main() +{ + test01(); + return 0; +}; diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/translate_nocase.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/translate_nocase.cc new file mode 100644 index 000000000..73fce8272 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/translate_nocase.cc @@ -0,0 +1,41 @@ +// { dg-do run } + +// 2007-03-12 Stephen M. Webb +// +// Copyright (C) 2007, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// tr1 [7.7] class template regex_traits (5) translate_nocase + +#include +#include + +// Tests default constructor of the regex_traits class. There is only the +// default constructor. +void test01() +{ + bool test __attribute__((unused)) = true; + std::tr1::regex_traits t; + VERIFY( t.translate_nocase('A') == 'a' ); +} + +int +main() +{ + test01(); + return 0; +}; diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/value.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/value.cc new file mode 100644 index 000000000..4f89afb61 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/char/value.cc @@ -0,0 +1,48 @@ +// { dg-do run } + +// 2008-08-11 Stephen M. Webb +// +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// tr1 [7.7] class template regex_traits value() function + +#include +#include + +// Tests the value() function of the regex_traits class. +void test01() +{ + bool test __attribute__((unused)) = true; + std::tr1::regex_traits t; + VERIFY( t.value('7', 8) == 7 ); + VERIFY( t.value('7', 10) == 7 ); + VERIFY( t.value('7', 16) == 7 ); + VERIFY( t.value('9', 8) == -1 ); + VERIFY( t.value('9', 10) == 9 ); + VERIFY( t.value('9', 16) == 9 ); + VERIFY( t.value('d', 8) == -1 ); + VERIFY( t.value('d', 10) == -1 ); + VERIFY( t.value('d', 16) == 13 ); +} + +int +main() +{ + test01(); + return 0; +}; diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/ctor.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/ctor.cc new file mode 100644 index 000000000..3c430ef4c --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/ctor.cc @@ -0,0 +1,48 @@ +// { dg-do link } + +// 2007-03-12 Stephen M. Webb +// +// Copyright (C) 2007, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// tr1 [7.7] class template regex_traits + +#include +#include + +// Tests default constructor of the regex_traits class. There is only the +// default constructor. +void test01() +{ + typedef std::tr1::regex_traits test_type; + + // required default constructor + test_type t; + + // Check for required typedefs + typedef test_type::char_type char_type; + typedef test_type::string_type string_type; + typedef test_type::locale_type locale_type; + typedef test_type::char_class_type char_class_type; +} + +int +main() +{ + test01(); + return 0; +}; diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/translate_nocase.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/translate_nocase.cc new file mode 100644 index 000000000..0404d0952 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/translate_nocase.cc @@ -0,0 +1,41 @@ +// { dg-do run } + +// 2007-03-12 Stephen M. Webb +// +// Copyright (C) 2007, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// tr1 [7.7] class template regex_traits (5) translate_nocase + +#include +#include + +// Tests default constructor of the regex_traits class. There is only the +// default constructor. +void test01() +{ + bool test __attribute__((unused)) = true; + std::tr1::regex_traits t; + VERIFY( t.translate_nocase(L'A') == L'a' ); +} + +int +main() +{ + test01(); + return 0; +}; diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/value.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/value.cc new file mode 100644 index 000000000..4f89afb61 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/value.cc @@ -0,0 +1,48 @@ +// { dg-do run } + +// 2008-08-11 Stephen M. Webb +// +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// tr1 [7.7] class template regex_traits value() function + +#include +#include + +// Tests the value() function of the regex_traits class. +void test01() +{ + bool test __attribute__((unused)) = true; + std::tr1::regex_traits t; + VERIFY( t.value('7', 8) == 7 ); + VERIFY( t.value('7', 10) == 7 ); + VERIFY( t.value('7', 16) == 7 ); + VERIFY( t.value('9', 8) == -1 ); + VERIFY( t.value('9', 10) == 9 ); + VERIFY( t.value('9', 16) == 9 ); + VERIFY( t.value('d', 8) == -1 ); + VERIFY( t.value('d', 10) == -1 ); + VERIFY( t.value('d', 16) == 13 ); +} + +int +main() +{ + test01(); + return 0; +}; -- cgit v1.2.3