aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/templates.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-07-31 15:04:25 +0200
committerTom de Vries <tdevries@suse.de>2024-07-31 15:04:25 +0200
commitc60b22e8edaeb7beffcf00c5616f4d4f12aae1be (patch)
tree7fe9a3678222784d8b99621dd9ce7d40c299c45d /gdb/testsuite/gdb.cp/templates.exp
parent35f09cd5d7fdd1a64f4d1751e73c3495bef1ed99 (diff)
downloadbinutils-c60b22e8edaeb7beffcf00c5616f4d4f12aae1be.zip
binutils-c60b22e8edaeb7beffcf00c5616f4d4f12aae1be.tar.gz
binutils-c60b22e8edaeb7beffcf00c5616f4d4f12aae1be.tar.bz2
[gdb/testsuite] Fix trailing-text-in-parentheses duplicates
Fix all trailing-text-in-parentheses duplicates exposed by previous patch. Tested on x86_64-linux and aarch64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.cp/templates.exp')
-rw-r--r--gdb/testsuite/gdb.cp/templates.exp15
1 files changed, 10 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp
index 52129d8..8dd0cdc 100644
--- a/gdb/testsuite/gdb.cp/templates.exp
+++ b/gdb/testsuite/gdb.cp/templates.exp
@@ -641,7 +641,8 @@ foreach t [list "int" "char" "Empty<int>"] {
gdb_test "break Foozle::fogey<$t>" "Breakpoint.*at.* \\(3 locations\\)"
foreach u [list "int" "char" "Empty<int>"] {
gdb_breakpoint "Foozle<$t>::fogey<$u>" message
- gdb_breakpoint "Foozle<$t>::fogey<$u> ($u)" message
+ gdb_assert { [gdb_breakpoint "Foozle<$t>::fogey<$u> ($u)" no-message] } \
+ "break Foozle<$t>::fogey<$u> ($u), success"
}
}
@@ -667,10 +668,14 @@ foreach t [list "Empty" "Foozle"] {
# Try a specific instance, both with and without whitespace
# after the template-template parameter.
- gdb_breakpoint "operator< <$tt> ($tt&, $tt&)" message
- gdb_breakpoint "operator< <$tt > ($tt&, $tt&)" message
- gdb_breakpoint "operator<< <$tt> ($tt&, $tt&)" message
- gdb_breakpoint "operator<< <$tt > ($tt&, $tt&)" message
+ set loc "operator< <$tt> ($tt&, $tt&)"
+ gdb_assert { [gdb_breakpoint $loc no-message] } "break $loc, success"
+ set loc "operator< <$tt > ($tt&, $tt&)"
+ gdb_assert { [gdb_breakpoint $loc no-message] } "break $loc, success"
+ set loc "operator<< <$tt> ($tt&, $tt&)"
+ gdb_assert { [gdb_breakpoint $loc no-message] } "break $loc, success"
+ set loc "operator<< <$tt > ($tt&, $tt&)"
+ gdb_assert { [gdb_breakpoint $loc no-message] } "break $loc, success"
}
# Test that "-qualified" finds no matching locations.