OSDN Git Service

Copyright updates for 2007.
[pf3gnuchains/pf3gnuchains4x.git] / gdb / testsuite / gdb.cp / local.exp
index 8654674..590265d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -15,9 +15,6 @@
 # along with this program; if not, write to the Free Software
 # 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-gdb@prep.ai.mit.edu
-
 # tests for local variables
 # Written by Satish Pai <pai@apollo.hp.com> 1997-07-08
 # Cleaned by Michael Chastain <mec@shout.net> 2002-04-08
@@ -45,7 +42,8 @@ set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+     untested local.exp
+     return -1
 }
 
 if [get_compiler_info $binfile "c++"] {
@@ -266,10 +264,20 @@ gdb_expect {
 #
 # chastain 2002-04-08
 
+# NOTE (2004-02-24, carlton): This test really is invalid -
+# 'NestedInnerLocal' shouldn't be visible, so only the third
+# expression should count as a pass.  I'm leaving in the earlier
+# passes, however, given the current problematic state of our local
+# class support, but once we fix PR gdb/482, we should delete this
+# test.
+
 send_gdb "ptype NestedInnerLocal\n"
 gdb_expect {
   -re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
   -re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*NestedInnerLocal *& *operator *= *\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((void|)\\);\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
+  -re "No symbol \"NestedInnerLocal\" in current context\.\r\n$gdb_prompt $" {
+    pass "ptype NestedInnerLocal"
+  }
   -re ".*$gdb_prompt $"   {  fail "ptype NestedInnerLocal" }
   timeout             { fail "(timeout) ptype NestedInnerLocal" }
 }