aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/17_intro
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@gcc.gnu.org>2000-04-21 20:33:34 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2000-04-21 20:33:34 +0000
commitb2dad0e3727cadca78d4c2cc51596d1ef1bf0946 (patch)
treee72cc26bb321e8bf90f4e68330674848db54eddf /libstdc++-v3/testsuite/17_intro
parent051d082b263958a8524d91066f5c481b9e048bfd (diff)
downloadgcc-b2dad0e3727cadca78d4c2cc51596d1ef1bf0946.zip
gcc-b2dad0e3727cadca78d4c2cc51596d1ef1bf0946.tar.gz
gcc-b2dad0e3727cadca78d4c2cc51596d1ef1bf0946.tar.bz2
libstdc++-v3: New directory.
2000-04-21 Benjamin Kosnik <bkoz@redhat.com> * libstdc++-v3: New directory. From-SVN: r33317
Diffstat (limited to 'libstdc++-v3/testsuite/17_intro')
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_ciso646.cc131
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_fstream.cc36
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_iomanip.cc36
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_ios.cc36
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_iosfwd.cc36
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_iostream.cc36
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_istream.cc36
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_ostream.cc36
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_sstream.cc36
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_streambuf.cc36
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers.cc83
11 files changed, 538 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/17_intro/header_ciso646.cc b/libstdc++-v3/testsuite/17_intro/header_ciso646.cc
new file mode 100644
index 0000000..6677db7
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/header_ciso646.cc
@@ -0,0 +1,131 @@
+// 1999-05-20 bkoz
+
+// Copyright (C) 1999 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 17.4.1.2 Headers, ciso646
+
+#include <ciso646>
+#ifdef DEBUG_ASSERT
+#include <assert.h>
+#endif
+
+
+// 2.11 Keywords
+// alternative representations
+// and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq
+
+// C 2.2.2 Header <iso646.h>
+// The tokens (as above) are keywords and do not appear as macros in <ciso646>.
+
+// Test for macros.
+bool test01()
+{
+ bool test = true;
+
+#ifdef and
+ test = false;
+#endif
+
+#ifdef and_eq
+ test = false;
+#endif
+
+#ifdef bitand
+ test = false;
+#endif
+
+#ifdef bitor
+ test = false;
+#endif
+
+#ifdef compl
+ test = false;
+#endif
+
+#ifdef not_eq
+ test = false;
+#endif
+
+#ifdef not_or
+ test = false;
+#endif
+
+#ifdef or
+ test = false;
+#endif
+
+#ifdef or_eq
+ test = false;
+#endif
+
+#ifdef xor
+ test = false;
+#endif
+
+#ifdef xor_eq
+ test = false;
+#endif
+
+#ifdef DEBUG_ASSERT
+ assert(test);
+#endif
+
+ return test;
+}
+
+
+// Equivalance in usage.
+bool test02()
+{
+ bool test = true;
+
+ bool arg1 = true;
+ bool arg2 = false;
+ int int1 = 45;
+ int int2 = 0;
+
+#if 0
+ // XXX g++ doesn't like this. Recognizes the keyword, but can't
+ // parse what's next.
+ test &= arg1 && int1;
+ test &= arg1 and int1;
+
+ test &= (arg1 && arg2) == (arg1 and arg2);
+ test &= (arg1 && int1) == (arg1 and int1);
+#endif
+
+#ifdef DEBUG_ASSERT
+ assert(test);
+#endif
+
+ return test;
+}
+
+
+int main(void)
+{
+ test01();
+ test02();
+
+ return 0;
+}
+
+
+
+
diff --git a/libstdc++-v3/testsuite/17_intro/header_fstream.cc b/libstdc++-v3/testsuite/17_intro/header_fstream.cc
new file mode 100644
index 0000000..7b7cf7c
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/header_fstream.cc
@@ -0,0 +1,36 @@
+// 1999-07-01 bkoz
+
+// Copyright (C) 1999 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 17.4.1.2 Headers, fstream
+
+#include <fstream>
+#ifdef DEBUG_ASSERT
+#include <assert.h>
+#endif
+
+
+int main(void)
+{
+ return 0;
+}
+
+
+
+
diff --git a/libstdc++-v3/testsuite/17_intro/header_iomanip.cc b/libstdc++-v3/testsuite/17_intro/header_iomanip.cc
new file mode 100644
index 0000000..70fd774
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/header_iomanip.cc
@@ -0,0 +1,36 @@
+// 1999-07-01 bkoz
+
+// Copyright (C) 1999 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 17.4.1.2 Headers, iomanip
+
+#include <iomanip>
+#ifdef DEBUG_ASSERT
+#include <assert.h>
+#endif
+
+
+int main(void)
+{
+ return 0;
+}
+
+
+
+
diff --git a/libstdc++-v3/testsuite/17_intro/header_ios.cc b/libstdc++-v3/testsuite/17_intro/header_ios.cc
new file mode 100644
index 0000000..e761ea6
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/header_ios.cc
@@ -0,0 +1,36 @@
+// 1999-07-01 bkoz
+
+// Copyright (C) 1999 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 17.4.1.2 Headers, ios
+
+#include <ios>
+#ifdef DEBUG_ASSERT
+#include <assert.h>
+#endif
+
+
+int main(void)
+{
+ return 0;
+}
+
+
+
+
diff --git a/libstdc++-v3/testsuite/17_intro/header_iosfwd.cc b/libstdc++-v3/testsuite/17_intro/header_iosfwd.cc
new file mode 100644
index 0000000..60f21f9
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/header_iosfwd.cc
@@ -0,0 +1,36 @@
+// 1999-07-01 bkoz
+
+// Copyright (C) 1999 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 17.4.1.2 Headers, iosfwd
+
+#include <iosfwd>
+#ifdef DEBUG_ASSERT
+#include <assert.h>
+#endif
+
+
+int main(void)
+{
+ return 0;
+}
+
+
+
+
diff --git a/libstdc++-v3/testsuite/17_intro/header_iostream.cc b/libstdc++-v3/testsuite/17_intro/header_iostream.cc
new file mode 100644
index 0000000..549969d
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/header_iostream.cc
@@ -0,0 +1,36 @@
+// 1999-07-01 bkoz
+
+// Copyright (C) 1999 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 17.4.1.2 Headers, iostream
+
+#include <iostream>
+#ifdef DEBUG_ASSERT
+#include <assert.h>
+#endif
+
+
+int main(void)
+{
+ return 0;
+}
+
+
+
+
diff --git a/libstdc++-v3/testsuite/17_intro/header_istream.cc b/libstdc++-v3/testsuite/17_intro/header_istream.cc
new file mode 100644
index 0000000..1e64ebf
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/header_istream.cc
@@ -0,0 +1,36 @@
+// 1999-07-01 bkoz
+
+// Copyright (C) 1999 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 17.4.1.2 Headers, istream
+
+#include <istream>
+#ifdef DEBUG_ASSERT
+#include <assert.h>
+#endif
+
+
+int main(void)
+{
+ return 0;
+}
+
+
+
+
diff --git a/libstdc++-v3/testsuite/17_intro/header_ostream.cc b/libstdc++-v3/testsuite/17_intro/header_ostream.cc
new file mode 100644
index 0000000..0bc90b5
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/header_ostream.cc
@@ -0,0 +1,36 @@
+// 1999-07-01 bkoz
+
+// Copyright (C) 1999 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 17.4.1.2 Headers, ostream
+
+#include <ostream>
+#ifdef DEBUG_ASSERT
+#include <assert.h>
+#endif
+
+
+int main(void)
+{
+ return 0;
+}
+
+
+
+
diff --git a/libstdc++-v3/testsuite/17_intro/header_sstream.cc b/libstdc++-v3/testsuite/17_intro/header_sstream.cc
new file mode 100644
index 0000000..b04e5ea
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/header_sstream.cc
@@ -0,0 +1,36 @@
+// 1999-07-01 bkoz
+
+// Copyright (C) 1999 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 17.4.1.2 Headers, sstream
+
+#include <sstream>
+#ifdef DEBUG_ASSERT
+#include <assert.h>
+#endif
+
+
+int main(void)
+{
+ return 0;
+}
+
+
+
+
diff --git a/libstdc++-v3/testsuite/17_intro/header_streambuf.cc b/libstdc++-v3/testsuite/17_intro/header_streambuf.cc
new file mode 100644
index 0000000..0847156
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/header_streambuf.cc
@@ -0,0 +1,36 @@
+// 1999-07-01 bkoz
+
+// Copyright (C) 1999 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 17.4.1.2 Headers, streambuf
+
+#include <streambuf>
+#ifdef DEBUG_ASSERT
+#include <assert.h>
+#endif
+
+
+int main(void)
+{
+ return 0;
+}
+
+
+
+
diff --git a/libstdc++-v3/testsuite/17_intro/headers.cc b/libstdc++-v3/testsuite/17_intro/headers.cc
new file mode 100644
index 0000000..d95f17a
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers.cc
@@ -0,0 +1,83 @@
+// 1999-05-12 bkoz
+
+// Copyright (C) 1999 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 17.4.1.2 Headers
+
+
+// "C++" headers
+#include <algorithm>
+#include <bitset>
+#include <complex>
+#include <deque>
+#include <exception>
+#include <fstream>
+#include <functional>
+#include <iomanip>
+#include <ios>
+#include <iosfwd>
+#include <iostream>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <memory>
+#include <new>
+#include <numeric>
+#include <ostream>
+#include <queue>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stdexcept>
+#include <streambuf>
+#include <string>
+#include <typeinfo>
+#include <utility>
+#include <valarray>
+#include <vector>
+
+// "C" headers
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cfloat>
+#include <ciso646>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+// "C" headers that might not work if wchar_t support is disabled.
+#include <bits/c++config.h>
+#if _GLIBCPP_USE_WCHAR_T
+ #include <cwchar>
+ #include <cwctype>
+#endif
+
+int main() { }