+2001-04-09 Martin M. Hunt <hunt@redhat.com>
+
+ * srcwin1.test: Fix line numbers to correspond to
+ modified source files in gdb.base. Commented-out test
+ case for moving up past main() because sometimes there
+ is a libc init function which makes the results
+ inconsistent.
+ * srcwin2.test: Ditto.
+ * srcwin3.test: Ditto.
+
1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
* testsuite/gdb.gdbtk/cpp_variable.test: Add test (2.75) to verify
-# Copyright (C) 1999 Cygnus Solutions
+# Copyright (C) 1999, 2001 Red Hat, 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
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "BROWSE_TAG"} {
- if {$i == "5.2"} {
+ if {$i == "10.2"} {
incr r
} else {
incr r 5
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "BROWSE_TAG"} {
- if {$i == "32.2"} {
+ if {$i == "38.2"} {
set line_number [$twin get "$i wordstart" "$i wordend"]
- if {$line_number == "32"} {
+ if {$line_number == "38"} {
incr r
} else {
incr r -100
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "32.2"} {
+ if {$i == "38.2"} {
incr r
} else {
incr r 5
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "32.2"} {
+ # return n + 1;
+ if {$i == "38.2"} {
incr r
} else {
incr r 5
}
}
if {$v == "STACK_TAG"} {
- if {$i == "22.2"} {
+ # oof (67);
+ if {$i == "26.2"} {
incr r
} else {
incr r 10
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "32.2"} {
+ # return n + 1;
+ if {$i == "38.2"} {
incr r
} else {
incr r 5
}
}
if {$v == "STACK_TAG"} {
- if {$i == "7.2"} {
+ # long_line ();
+ if {$i == "12.2"} {
incr r
} else {
incr r 10
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "STACK_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
set r
} {1}
+# Disabled for now because there are different correct results.
+# Test should be rewritten to include those.
# Test: srcwin-3.5
# Desc: "stack up" when we are at the top
-gdbtk_test srcwin-3.5 "stack up when at the top" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
+#gdbtk_test srcwin-3.5 "stack up when at the top" {
+# $srcwin stack up
+# set r 0
+# set name [$statbar.name get]
+# set func [$statbar.func get]
+#
# check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
+# if {$name != "list0.c"} {set r -1}
+# if {$func != "main"} {set r -2}
# check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
+# set twin [$stw test_get twin]
+# set a [$twin get 1.0 end]
+# if {[string compare $file1(source) $a]} {set r -3}
# check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- if {$i == "12.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
+# if {$r == 0} {
+# if {![catch {set z [$twin dump -tag 1.0 end]}]} {
+# foreach {k v i} $z {
+# if {$k == "tagon"} {
+# if {$v == "STACK_TAG"} {
+# if {$i == "12.2"} {
+# incr r
+# } else {
+# incr r 5
+# }
+# }
+# if {$v == "PC_TAG"} {incr r 10}
+# if {$v == "BROWSE_TAG"} {incr r 100}
+# }
+# }
+# } else {
+# set r -4
+# }
+# }
+# set r
+#} {1}
# Test: srcwin-3.6
# Desc: "stack down" test
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "STACK_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "32.2"} {
+ if {$i == "38.2"} {
incr r
} else {
incr r 5
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "32.2"} {
+ if {$i == "38.2"} {
incr r
} else {
incr r 5
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "BROWSE_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
if {$v == "STACK_TAG"} {incr r 10}
if {$v == "PC_TAG"} {incr r 100}
} elseif {$k == "image"} {
- if {$i == "8.0"} {
+ if {$i == "9.0"} {
incr r
} else {
set r -200
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "BROWSE_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
if {$v == "STACK_TAG"} {incr r 10}
if {$v == "PC_TAG"} {incr r 100}
} elseif {$k == "image"} {
- if {$i == "8.0"} {
+ if {$i == "9.0"} {
incr r
} else {
set r -200
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
move_mouse_to $twin [$twin bbox 10.$index]
sleep 1
if {[winfo ismapped $balloon]} {
- if {![string compare "x=6" [$balloon.label cget -text]]} {incr r}
+ if {![string compare "x=5" [$balloon.label cget -text]]} {incr r}
gdb_immediate "continue" 1
- if {![string compare "x=8" [$balloon.label cget -text]]} {incr r}
+ if {![string compare "x=7" [$balloon.label cget -text]]} {incr r}
} else {
set r -1
}
-# Copyright (C) 1999 Cygnus Solutions
+# Copyright (C) 1999, 2001 Red Hat, 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
# now get a dump of all tags and check that only one line is
# marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
- # We know that list1.c should have BROWSE_TAG set at index 5.2
+ # We know that list1.c should have BROWSE_TAG set at index 10.2
# for function "bar". If list1.c is changed or the layout of the source
# window is changed, this must be updated.
if {![catch {set z [$twin dump -tag 1.0 end]}]} {
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "BROWSE_TAG"} {
- if {$i == "5.2"} {
+ if {$i == "10.2"} {
incr r
} else {
incr r 5
# now get a dump of all tags and check that only one line is
# marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
- # We know that list1.c should have BROWSE_TAG set at index 32.2
+ # We know that list1.c should have BROWSE_TAG set at index 38.2
# for function "oof". If list1.c is changed or the layout of the source
# window is changed, this must be updated.
if {![catch {set z [$twin dump -tag 1.0 end]}]} {
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "BROWSE_TAG"} {
- if {$i == "32.2"} {
+ if {$i == "38.2"} {
set line_number [$twin get "$i wordstart" "$i wordend"]
- if {$line_number == "32"} {
+ if {$line_number == "38"} {
incr r
} else {
incr r -100
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "32.2"} {
+ if {$i == "38.2"} {
incr r
} else {
incr r 5
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "32.2"} {
+ if {$i == "38.2"} {
incr r
} else {
incr r 5
}
}
if {$v == "STACK_TAG"} {
- if {$i == "22.2"} {
+ if {$i == "26.2"} {
incr r
} else {
incr r 10
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "32.2"} {
+ if {$i == "38.2"} {
incr r
} else {
incr r 5
}
}
if {$v == "STACK_TAG"} {
- if {$i == "7.2"} {
+ if {$i == "12.2"} {
incr r
} else {
incr r 10
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "STACK_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
set r
} {1}
+
+# Disabled for now because there are different correct results.
+# Test should be rewritten to include those.
# Test: srcwin2-3.5
# Desc: "stack up" when we are at the top
-gdbtk_test srcwin2-3.5 "stack up when at the top" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
+#gdbtk_test srcwin2-3.5 "stack up when at the top" {
+# $srcwin stack up
+# set r 0
+# set name [$statbar.name get]
+# set func [$statbar.func get]
# check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
+# if {$name != "list0.c"} {set r -1}
+# if {$func != "main"} {set r -2}
# check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
+# set twin [$stw test_get twin]
+# set a [$twin get 1.0 end]
+# if {[string compare $file1(source) $a]} {set r -3}
# check for STACK_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
+# if {$r == 0} {
+# if {![catch {set z [$twin dump -tag 1.0 end]}]} {
+# foreach {k v i} $z {
+# if {$k == "tagon"} {
+# if {$v == "STACK_TAG"} {
+# incr r
+# }
+# if {$v == "PC_TAG"} {incr r 10}
+# if {$v == "BROWSE_TAG"} {incr r 100}
+# }
+# }
+# } else {
+# set r -4
+# }
+# }
+# set r
+#} {1}
# Test: srcwin2-3.6
# Desc: "stack down" test
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "STACK_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "32.2"} {
+ if {$i == "38.2"} {
incr r
} else {
incr r 5
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "32.2"} {
+ if {$i == "38.2"} {
incr r
} else {
incr r 5
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "BROWSE_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
if {$v == "STACK_TAG"} {incr r 10}
if {$v == "PC_TAG"} {incr r 100}
} elseif {$k == "image"} {
- if {$i == "8.0"} {
+ if {$i == "9.0"} {
incr r
} else {
set r -200
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "BROWSE_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
if {$v == "STACK_TAG"} {incr r 10}
if {$v == "PC_TAG"} {incr r 100}
} elseif {$k == "image"} {
- if {$i == "8.0"} {
+ if {$i == "9.0"} {
incr r
} else {
set r -200
foreach {k v i} $z {
if {$k == "tagon"} {
if {$v == "PC_TAG"} {
- if {$i == "8.2"} {
+ if {$i == "9.2"} {
incr r
} else {
incr r 5
-# Copyright (C) 1999 Cygnus Solutions
+# Copyright (C) 1999, 2001 Red Hat, 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
set r
} {1}
+# Disabled for now because there are different correct results.
+# Test should be rewritten to include those.
# Test: srcwin3-3.5
# Desc: "stack up" when we are at the top
-gdbtk_test srcwin3-3.5 "stack up when at the top" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
+#gdbtk_test srcwin3-3.5 "stack up when at the top" {
+# $srcwin stack up
+# set r 0
+# set name [$statbar.name get]
+# set func [$statbar.func get]
# check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "main"} {set r -2}
+# if {$name != ""} {set r -1}
+# if {$func != "main"} {set r -2}
# check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(main) $a]} {set r -3}
+# set twin [$stw test_get twin]
+# set a [$twin get 1.0 end]
+# if {[string compare $source(main) $a]} {set r -3}
# check for STACK_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
+# if {$r == 0} {
+# if {![catch {set z [$twin dump -tag 1.0 end]}]} {
+# foreach {k v i} $z {
+# if {$k == "tagon"} {
+# if {$v == "STACK_TAG"} {
+# incr r
+# }
+# if {$v == "PC_TAG"} {incr r 10}
+# if {$v == "BROWSE_TAG"} {incr r 100}
+# }
+# }
+# } else {
+# set r -4
+# }
+# }
+# set r
+#} {1}
# Test: srcwin3-3.6
# Desc: "stack down" test