mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
gdb/testsuite: Remove duplicates from gdb.base/pointers.exp
When I run the testsuite, I have : Running .../gdb/testsuite/gdb.base/pointers.exp ... DUPLICATE: gdb.base/pointers.exp: pointer assignment Fix by placing the sections with duplication in with_test_prefix blocks. This removes the duplication and gives a better organization the file. Tested on x86_64-linux. Co-Authored-By: Pedro Alves <pedro@palves.net>
This commit is contained in:
@ -145,18 +145,20 @@ gdb_test "print v_int_pointer < v_int_pointer2" " = $true" \
|
||||
gdb_test "print v_int_pointer > v_int_pointer2" " = $false" \
|
||||
"pointer1>pointer2"
|
||||
|
||||
with_test_prefix "post-increment" {
|
||||
gdb_test_no_output "set variable y = *v_int_pointer++" \
|
||||
"set y = *v_int_pointer++"
|
||||
gdb_test "print y" " = 6" "pointer assignment"
|
||||
gdb_test "print *v_int_pointer" " = 18" "and post-increment"
|
||||
}
|
||||
|
||||
|
||||
|
||||
with_test_prefix "pre-decrement" {
|
||||
gdb_test_no_output "set variable y = *--v_int_pointer2" \
|
||||
"set y = *--v_int_pointer2"
|
||||
gdb_test "print y" " = 6" "pointer assignment"
|
||||
gdb_test "print *v_int_pointer2" " = 6" "and pre-decrement"
|
||||
|
||||
}
|
||||
|
||||
|
||||
gdb_test_no_output "set variable y =v_int_pointer-v_int_pointer2" \
|
||||
|
Reference in New Issue
Block a user