-# Copyright (C) 1988, 90, 91, 92, 1994, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1988, 90, 91, 92, 1994, 1997, 2000, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-g++@prep.ai.mit.edu
-
-# This file was written by Rob Savoye. (rob@cygnus.com)
-
-#
-# these tests come from the original DejaGnu test suite
-# developed at Cygnus Support. If this isn't deja gnu, I
-# don't know what is...
-#
-
-# load support procs
-load_lib old-dejagnu.exp
-load_lib g++.exp
-
-
-# When a testcase doesn't have any special options, use these.
-if ![info exists DEFAULT_CXXFLAGS] {
- set DEFAULT_CXXFLAGS "-ansi -pedantic-errors"
+# Load support procs.
+load_lib g++-dg.exp
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CXXFLAGS
+if ![info exists DEFAULT_CXXFLAGS] then {
+ set DEFAULT_CXXFLAGS " -ansi -pedantic-errors -Wno-long-long"
}
-old-dejagnu-init
-global GXX_UNDER_TEST
-
-#
-# main test loop
-#
+# Initialize `dg'.
+dg-init
-set dirlen [expr [string length "$srcdir/$subdir"] + 1];
-foreach file [lsort [find $srcdir/$subdir *.C]] {
- # If we're only testing specific files and this isn't one of them, skip it.
- set tfile [string range $file $dirlen end];
- if ![runtest_file_p $runtests $tfile] then {
- continue
- }
- verbose "Testing $file"
+# Gather a list of all tests, with the exception of those in directories
+# that are handled specially.
+set tests [lsort [find $srcdir/$subdir *.C]]
- # We don't want old-dejagnu.exp to have to know about all the global
- # variables we use. For now we tell it about CXXFLAGS and LIBS and
- # leave LDFLAGS alone.
- old-dejagnu $GXX_UNDER_TEST "$file" "" "$DEFAULT_CXXFLAGS" "-lstdc++"
-}
+# Main loop.
+dg-runtest $tests "" $DEFAULT_CXXFLAGS
-# The framework doesn't like to see any error remnants,
-# so remove them.
-if [info exists errorInfo] then {
- unset errorInfo
-}
+# All done.
+dg-finish